enable publishing on build success

This commit is contained in:
alice pellerin
2026-05-02 00:02:50 -05:00
parent bd67084b87
commit 2198c9f787
2 changed files with 12 additions and 35 deletions
-21
View File
@@ -1,21 +0,0 @@
name: publish
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC token exchange
steps:
- uses: actions/checkout@v6
- name: check version
# cut off the v part of the tag to only search for the number
# include the " = " to not match on main, only v* tags
run: grep -q " = \"$(echo "${{ github.ref_name }}" | cut -c2-)\"" Cargo.toml
- uses: rust-lang/crates-io-auth-action@v1
id: auth
- run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
+12 -14
View File
@@ -71,18 +71,16 @@ jobs:
publish:
runs-on: ubuntu-latest
needs: release
permissions:
id-token: write # Required for OIDC token exchange
steps:
- run: echo "publish here!"
# permissions:
# id-token: write # Required for OIDC token exchange
# steps:
# - uses: actions/checkout@v6
# - name: check version
# # cut off the v part of the tag to only search for the number
# # include the " = " to not match on main, only v* tags
# run: grep -q " = \"$(echo "${{ github.ref_name }}" | cut -c2-)\"" Cargo.toml
# - uses: rust-lang/crates-io-auth-action@v1
# id: auth
# - run: cargo publish
# env:
# CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
- uses: actions/checkout@v6
- name: check version
# cut off the v part of the tag to only search for the number
# include the " = " to not match on main, only v* tags
run: grep -q " = \"$(echo "${{ github.ref_name }}" | cut -c2-)\"" Cargo.toml
- uses: rust-lang/crates-io-auth-action@v1
id: auth
- run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}