Improve TUI readability and fix leaked translation keys in the next r… #20
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-linux-x86_64: | |
| name: Build Linux x86_64 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-unknown-linux-musl | |
| - run: | | |
| sudo apt-get update | |
| sudo apt-get install -y musl-tools | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo build --release --target x86_64-unknown-linux-musl | |
| - run: | | |
| mkdir -p dist | |
| cp target/x86_64-unknown-linux-musl/release/snout \ | |
| "dist/snout-${{ github.ref_name }}-linux-x86_64" | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: release-linux-x86_64 | |
| path: dist/snout-${{ github.ref_name }}-linux-x86_64 | |
| build-linux-aarch64: | |
| name: Build Linux aarch64 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-unknown-linux-musl | |
| - run: | | |
| sudo apt-get update | |
| sudo apt-get install -y musl-tools gcc-aarch64-linux-gnu | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo build --release --target aarch64-unknown-linux-musl | |
| - run: | | |
| mkdir -p dist | |
| cp target/aarch64-unknown-linux-musl/release/snout \ | |
| "dist/snout-${{ github.ref_name }}-linux-aarch64" | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: release-linux-aarch64 | |
| path: dist/snout-${{ github.ref_name }}-linux-aarch64 | |
| build-macos: | |
| name: Build macOS ${{ matrix.target }} | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-apple-darwin | |
| suffix: macos-x86_64 | |
| - target: aarch64-apple-darwin | |
| suffix: macos-aarch64 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo build --release --target ${{ matrix.target }} | |
| - run: | | |
| mkdir -p dist | |
| cp target/${{ matrix.target }}/release/snout \ | |
| "dist/snout-${{ github.ref_name }}-${{ matrix.suffix }}" | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: release-${{ matrix.suffix }} | |
| path: dist/snout-${{ github.ref_name }}-${{ matrix.suffix }} | |
| build-windows-x86_64: | |
| name: Build Windows x86_64 | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo build --release | |
| - shell: bash | |
| run: | | |
| mkdir -p dist | |
| cp target/release/snout.exe "dist/snout-${{ github.ref_name }}-windows-x86_64.exe" | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: release-windows-x86_64 | |
| path: dist/snout-${{ github.ref_name }}-windows-x86_64.exe | |
| publish-release: | |
| name: Publish GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-linux-x86_64 | |
| - build-linux-aarch64 | |
| - build-macos | |
| - build-windows-x86_64 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| path: release-artifacts | |
| - name: Create or update release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| if ! gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then | |
| gh release create "${{ github.ref_name }}" \ | |
| --title "${{ github.ref_name }}" \ | |
| --generate-notes | |
| fi | |
| - name: Upload release assets | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| find release-artifacts -type f -print0 | while IFS= read -r -d '' file; do | |
| gh release upload "${{ github.ref_name }}" "$file" --clobber | |
| done | |
| publish-aur-snout-bin: | |
| name: Publish snout-bin to AUR | |
| runs-on: ubuntu-latest | |
| needs: | |
| - publish-release | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Extract version | |
| id: version | |
| run: echo "version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT" | |
| - name: Update PKGBUILD version | |
| run: | | |
| sed -i "s/^pkgver=.*/pkgver=${{ steps.version.outputs.version }}/" snout-bin/PKGBUILD | |
| sed -i "s/^pkgrel=.*/pkgrel=1/" snout-bin/PKGBUILD | |
| - name: Publish to AUR | |
| uses: KSXGitHub/github-actions-deploy-aur@v4.1.3 | |
| with: | |
| pkgname: snout-bin | |
| pkgbuild: ./snout-bin/PKGBUILD | |
| updpkgsums: true | |
| commit_username: ${{ secrets.AUR_USERNAME }} | |
| commit_email: ${{ secrets.AUR_EMAIL }} | |
| ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} | |
| commit_message: Update to version ${{ steps.version.outputs.version }} | |
| ssh_keyscan_types: rsa,ecdsa,ed25519 |