Skip to content

Commit

Permalink
ci(repo): Add workflow dispatch for publish crates action
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Jan 24, 2025
1 parent 825fd5a commit 4796a8d
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/publish_release.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand All @@ -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
Expand Down

0 comments on commit 4796a8d

Please sign in to comment.