Skip to content

Commit

Permalink
ci: set registry auth tokens (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega authored Feb 9, 2024
1 parent 23122c7 commit d91628b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/actions/node-release/action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: 'release npm package'
description: 'Transpiles and publishes the Node package from the codegen artifact'
inputs:
npm-registry-token:
registry-token:
description: token to authenticate to npmjs.org
required: true
required: false
mode:
description: supporte values are 'release' and 'dry-run'
required: true
Expand Down Expand Up @@ -38,6 +38,6 @@ runs:
working-directory: codegen/node
shell: bash
env:
NPM_REGISTRY_TOKEN: ${{ inputs.npm-registry-token }}
NPM_TOKEN: ${{ inputs.registry-token }}
run: |
npm publish
npm publish --access public
6 changes: 3 additions & 3 deletions .github/actions/rust-release/action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: 'release rust crate'
description: 'Builds the Rust crate from the codegen artifact'
inputs:
cargo-registry-token:
registry-token:
description: token to authenticate to crates.io
required: true
required: false
mode:
description: supporte values are 'release' and 'dry-run'
required: true
Expand Down Expand Up @@ -31,6 +31,6 @@ runs:
working-directory: codegen/rust
shell: bash
env:
CARGO_REGISTRY_TOKEN: ${{ inputs.cargo-registry-token }}
CARGO_REGISTRY_TOKEN: ${{ inputs.registry-token }}
run: |
cargo publish --allow-dirty
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- uses: ./.github/actions/rust-release
with:
cargo-registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
mode: ${{ inputs.mode }}

node-release:
Expand All @@ -40,5 +40,5 @@ jobs:

- uses: ./.github/actions/node-release
with:
npm-registry-token: ${{ secrets.NPM_REGISTRY_TOKEN }}
registry-token: ${{ secrets.NPM_REGISTRY_TOKEN }}
mode: ${{ inputs.mode }}
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
publish:
needs: [publish-dry-run]
uses: ./.github/workflows/publish.yml
secrets: inherit
with:
mode: "release"

Expand Down
4 changes: 4 additions & 0 deletions gen/node/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
registry=https://registry.npmjs.org/
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

@utxorpc:registry=https://registry.npmjs.org/

0 comments on commit d91628b

Please sign in to comment.