--- on: release: types: [published] jobs: make-release: runs-on: ubuntu-latest name: Compile and upload a release build steps: - uses: actions/checkout@v4 - name: Get Cargo version run: echo "cargo_version=v$(grep "^version" Cargo.toml | cut -d \" -f2)" >> $GITHUB_ENV - name: Abort if Cargo.toml & Git Tag versions don't match if: ${{ env.cargo_version != github.ref_name }} run: exit 1 - name: Install Rust Stable uses: dtolnay/rust-toolchain@stable - name: Build binary crate run: cargo build --release - name: Rename binary to include architecture run: mv target/release/gt-tool target/release/gt-tool-${{ github.ref_name }}-$(arch) - name: Upload the program (using itself!) run: > target/release/gt-tool-${{ github.ref_name }}-$(arch) -u ${{ vars.DEST_GITEA }} -o ${{ vars.DEST_OWNER }} -r ${{ vars.DEST_REPO }} upload-release "${{ github.ref_name }}" target/release/gt-tool-${{ github.ref_name }}-$(arch) env: RELEASE_KEY_GITEA: ${{ secrets.RELEASE_KEY_GITEA }} ...