update: bump version 0.2.7 -> 0.2.8 #66
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: Publish pre-release | |
on: | |
push: | |
branches: [main] | |
jobs: | |
github: | |
name: Publish GitHub | |
environment: GITHUB_PRE_RELEASE | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
- name: Setup Rust toolchain for ubuntu-latest | |
uses: actions-rust-lang/setup-rust-toolchain@02be93da58aa71fb456aa9c43b301149248829d8 | |
- name: Package | |
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 | |
with: | |
command: package | |
args: --all-features | |
- name: Read crate name | |
id: crate_name | |
run: echo "crate_name=$(cargo read-manifest | jq -r .name)" >> $GITHUB_OUTPUT | |
- name: Read version | |
id: version | |
run: echo "version=$(cargo read-manifest | jq -r .version)" >> $GITHUB_OUTPUT | |
- name: Read git commit hash | |
id: commit_hash | |
run: echo "commit_hash=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_OUTPUT | |
- name: Create release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Provided by GitHub Actions | |
run: gh release create "${{ steps.commit_hash.outputs.commit_hash }}" --repo="$GITHUB_REPOSITORY" --target main --title="Pre-Release ${{ steps.commit_hash.outputs.commit_hash }} (${{ steps.version.outputs.version }})" --generate-notes --prerelease "./target/package/${{ steps.crate_name.outputs.crate_name }}-${{ steps.version.outputs.version }}.crate" |