Rebuild release and changes Cargo.lock accordingly #75
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
# Pattern matched against refs/tags | |
tags: | |
- '*' # Push events to every tag not containing / | |
name: compile | |
jobs: | |
build: | |
name: Build artifacts | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- target: x86_64-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: aarch64-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: x86_64-apple-darwin | |
os: macos-latest | |
- target: x86_64-pc-windows-gnu | |
os: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Install linker(aarch64) | |
if: matrix.target == 'aarch64-unknown-linux-gnu' | |
run: | | |
sudo apt update | |
sudo apt install gcc-aarch64-linux-gnu | |
- name: Add rustup target | |
run: rustup target add ${{ matrix.target }} | |
- name: Build | |
run: cargo build --release --target ${{ matrix.target }} | |
- name: Move binaries (Linux/MacOS) | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
run: mv ./target/${{ matrix.target }}/release/prot-scriber ./${{ matrix.target }}_prot-scriber | |
- name: Move binaries and generate manual (Windows) | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
run: | | |
mv ./target/${{ matrix.target }}/release/prot-scriber.exe ./${{ matrix.target }}_prot-scriber.exe | |
chmod a+x ./${{ matrix.target }}_prot-scriber | |
./${{ matrix.target }}_prot-scriber --help >> prot-scriber-manual.txt | |
- name: Binary relase (Linux/MaxOS) | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ${{ matrix.target }}_prot-scriber | |
- name: Relase help-text / manual (Windows) | |
if: matrix.os == 'windows-latest' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: prot-scriber-manual.txt | |
- name: Relase (Windows) | |
if: matrix.os == 'windows-latest' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ${{ matrix.target }}_prot-scriber.exe |