Build for linux x86_64 #24
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
name: "Build for linux" | |
on: | |
release: | |
types: [created] | |
jobs: | |
release: | |
name: release linux | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: hecrj/setup-rust-action@v1.4.0 | |
with: | |
rust-version: stable | |
- uses: awalsh128/cache-apt-pkgs-action@v1 | |
with: | |
packages: musl-tools | |
version: 1.0 | |
- run: | | |
mkdir -p $HOME/.local/bin | |
ln -s "/usr/bin/g++" "$HOME/.local/bin/musl-g++" | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Compile | |
shell: bash | |
run: | | |
cargo clean | |
rustup component add rust-std-x86_64-unknown-linux-musl | |
cargo build --target x86_64-unknown-linux-musl --release | |
- run: cp target/release/rusty-pullauta . | |
- name: 'Compress binaries' | |
if: true | |
uses: a7ul/tar-action@v1.1.2 | |
with: | |
command: c | |
files: | | |
rusty-pullauta | |
LICENSE | |
README.md | |
osm.txt | |
fastighetskartan.txt | |
outPath: '${{ runner.temp }}/rusty-pullauta-x86_64-linux.tar.gz' | |
- name: 'Release binaries' | |
if: true | |
uses: pragmatrix/release-action@v1.11.1-rs | |
with: | |
allowUpdates: true | |
replacesArtifacts: true | |
artifacts: '${{ runner.temp }}/rusty-pullauta-x86_64-linux.tar.gz' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifactErrorsFailBuild: true | |
prerelease: true |