update dependencies and release #7
Workflow file for this run
This file contains hidden or 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: sbuild-linter release | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "v*.*.*-linter" | |
| permissions: | |
| contents: write | |
| jobs: | |
| publish-binaries: | |
| name: Publish binaries | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build: | |
| - { | |
| NAME: x86_64-linux, | |
| TARGET: x86_64-unknown-linux-musl, | |
| } | |
| - { | |
| NAME: aarch64-linux, | |
| TARGET: aarch64-unknown-linux-musl, | |
| } | |
| - { | |
| NAME: riscv64-linux, | |
| TARGET: riscv64gc-unknown-linux-musl | |
| } | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set the release version | |
| shell: bash | |
| run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| --allow-unauthenticated musl-tools b3sum | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| targets: ${{ matrix.build.TARGET }} | |
| - name: Install cross-compilation tools | |
| uses: taiki-e/setup-cross-toolchain-action@v1 | |
| with: | |
| target: ${{ matrix.build.TARGET }} | |
| - name: Build | |
| run: RUSTFLAGS="-C target-feature=+crt-static" cargo build --bin sbuild-linter --release --locked --target ${{ matrix.build.TARGET }} | |
| - name: Prepare release assets | |
| shell: bash | |
| run: | | |
| mkdir -p release | |
| cp {LICENSE,README.md} release/ | |
| cp "target/${{ matrix.build.TARGET }}/release/sbuild-linter" release/ | |
| - name: Create release artifacts | |
| shell: bash | |
| run: | | |
| cp release/sbuild-linter sbuild-linter-${{ matrix.build.NAME }} | |
| b3sum sbuild-linter-${{ matrix.build.NAME }} \ | |
| > sbuild-linter-${{ matrix.build.NAME }}.b3sum | |
| tar -czvf sbuild-linter-${{ matrix.build.NAME }}.tar.gz \ | |
| release/ | |
| b3sum sbuild-linter-${{ matrix.build.NAME }}.tar.gz \ | |
| > sbuild-linter-${{ matrix.build.NAME }}.tar.gz.b3sum | |
| - name: Publish to GitHub | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: sbuild-linter-${{ matrix.build.NAME }}* | |
| file_glob: true | |
| overwrite: true | |
| tag: ${{ github.ref }} | |
| release_name: "sbuild-linter v${{ env.RELEASE_VERSION }}" |