Skip to content

Commit

Permalink
added script to publish crate automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
Bullrich committed May 24, 2024
1 parent 37c7065 commit 6044fc2
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: NPM Release

on:
release:
types:
- released

env:
CI: true

permissions:
id-token: write

jobs:
publish:
name: Build & Publish to Crates.io
runs-on: ubuntu-latest
steps:
- name: Clean variable
id: version
run: |
TAG=${{ github.event.release.tag_name }}
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Edit Toml
uses: ciiiii/toml-editor@1.0.0
with:
file: "Cargo.toml"
key: "version"
value: "${{ steps.version.outputs.VERSION }}"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 comments on commit 6044fc2

Please sign in to comment.