diff --git a/.github/actions/node-release/action.yml b/.github/actions/node-release/action.yml index ef86a3d..e61909f 100644 --- a/.github/actions/node-release/action.yml +++ b/.github/actions/node-release/action.yml @@ -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 @@ -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 diff --git a/.github/actions/rust-release/action.yml b/.github/actions/rust-release/action.yml index ac0bcd7..3b551ab 100644 --- a/.github/actions/rust-release/action.yml +++ b/.github/actions/rust-release/action.yml @@ -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 @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3c9eff8..db68ed7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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: @@ -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 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31d4518..40067df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,7 @@ jobs: publish: needs: [publish-dry-run] uses: ./.github/workflows/publish.yml + secrets: inherit with: mode: "release" diff --git a/gen/node/.npmrc b/gen/node/.npmrc new file mode 100644 index 0000000..c5839b7 --- /dev/null +++ b/gen/node/.npmrc @@ -0,0 +1,4 @@ +registry=https://registry.npmjs.org/ +//registry.npmjs.org/:_authToken=${NPM_TOKEN} + +@utxorpc:registry=https://registry.npmjs.org/ \ No newline at end of file