enable publishing on build success
This commit is contained in:
@@ -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 }}
|
|
||||||
@@ -71,18 +71,16 @@ jobs:
|
|||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: release
|
needs: release
|
||||||
|
permissions:
|
||||||
|
id-token: write # Required for OIDC token exchange
|
||||||
steps:
|
steps:
|
||||||
- run: echo "publish here!"
|
- uses: actions/checkout@v6
|
||||||
# permissions:
|
- name: check version
|
||||||
# id-token: write # Required for OIDC token exchange
|
# cut off the v part of the tag to only search for the number
|
||||||
# steps:
|
# include the " = " to not match on main, only v* tags
|
||||||
# - uses: actions/checkout@v6
|
run: grep -q " = \"$(echo "${{ github.ref_name }}" | cut -c2-)\"" Cargo.toml
|
||||||
# - name: check version
|
- uses: rust-lang/crates-io-auth-action@v1
|
||||||
# # cut off the v part of the tag to only search for the number
|
id: auth
|
||||||
# # include the " = " to not match on main, only v* tags
|
- run: cargo publish
|
||||||
# run: grep -q " = \"$(echo "${{ github.ref_name }}" | cut -c2-)\"" Cargo.toml
|
env:
|
||||||
# - uses: rust-lang/crates-io-auth-action@v1
|
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
|
||||||
# id: auth
|
|
||||||
# - run: cargo publish
|
|
||||||
# env:
|
|
||||||
# CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user