diff --git a/.github/workflows/publish_release.yaml b/.github/workflows/publish_release.yaml index 8f88967a..7584ebe5 100644 --- a/.github/workflows/publish_release.yaml +++ b/.github/workflows/publish_release.yaml @@ -1,13 +1,17 @@ name: Publish on Crates.io on: - release: - types: - - published + workflow_dispatch: + inputs: + version: + description: "Version to release" + required: true + type: string env: CI: true RUST_VERSION: 1.81.0 + RUST_NIGHTLY_VERSION: nightly-2024-11-06 concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -27,9 +31,17 @@ jobs: - name: Install Rust uses: ./.github/actions/setup-rust with: - toolchain: ${{ env.RUST_VERSION }} + toolchain: ${{ env.RUST_NIGHTLY_VERSION }} target: x86_64-unknown-linux-gnu,wasm32-unknown-unknown + - name: Bump Version + if: ${{ inputs.version != '' }} + run: | + make bump-version VERSION=${{ inputs.version }} + git add . + git commit -m "Bump version to ${inputs.version}" + git push + - name: Publish Crate uses: katyo/publish-crates@v2 id: publish-crates