Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: pass registry tokens as workflow inputs #61

Merged
merged 10 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/
Loading