This repository was archived by the owner on Aug 13, 2025. It is now read-only.
Rust Release #33
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: Rust Release | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| release: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache Cargo Dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y libgtk-4-* build-essential pkg-config libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev \ | |
| libxkbcommon-dev libssl-dev | |
| - name: Build Release | |
| run: cargo build --release | |
| - name: Determine Version | |
| id: ver | |
| run: | | |
| ver=$(grep -i '^version' Cargo.toml \ | |
| | head -n1 \ | |
| | cut -d\" -f2) | |
| echo "RELEASE_NAME=Release v${ver}" >> $GITHUB_ENV | |
| echo "TAG_NAME=${ver}" >> $GITHUB_ENV | |
| - name: Create GitHub Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: ${{ env.TAG_NAME }} | |
| name: ${{ env.RELEASE_NAME }} | |
| body: "Automated release of v${{ env.TAG_NAME }}" | |
| draft: false | |
| prerelease: false | |
| artifacts: "target/release/codlinux" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |