Skip to content

Commit

Permalink
Merge pull request #916 from lukso-network/fix/npm-publish
Browse files Browse the repository at this point in the history
ci: add `.npmrc` config file + setup `publish` as environnment to access `NPM_PUBLISH_TOKEN` via npm publish
  • Loading branch information
CJ42 authored Mar 7, 2024
2 parents 819aa37 + 0eebe0c commit 60da94f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ permissions:
jobs:
release-please:
runs-on: ubuntu-latest
environment: publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_KEY }}

steps:
- uses: google-github-actions/release-please-action@v3
id: release
Expand All @@ -31,7 +35,7 @@ jobs:
if: ${{ steps.release.outputs.releases_created }}

- name: Use Node.js v20
uses: actions/setup-node@v3
uses: actions/setup-node@v4
if: ${{ steps.release.outputs.releases_created }}
with:
node-version: "20.x"
Expand Down Expand Up @@ -61,5 +65,3 @@ jobs:
END
)
node ./publish.mjs outputs.json
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_KEY }}
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
registry=https://registry.npmjs.org/
always-auth=true
3 changes: 0 additions & 3 deletions config/tsconfig/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "0.0.0",
"private": true,
"license": "Apache-2.0",
"publishConfig": {
"access": "public"
},
"files": [
"contracts.json",
"contracts.module.json"
Expand Down
2 changes: 1 addition & 1 deletion packages/lsp-smart-contracts/scripts/ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The following folder contains files that are usually used as part of the CI/CD o

- `ci/check-deployer-balance.ts`: check if the deployer address has at least 1 LYX to deploy the contract via `ci/deploy-verify.sh`.
- `ci/deploy-verify.sh`: shell utility command to deploy + verify a smart contract on a specified network.
- `ci/docs-generate.ts`: used to generate the user and dev docs into separate JSON files (this is used as part of our release CI to prepare the package when publoishing it on [npmjs.org](https://www.npmjs.com/package/@lukso/lsp-smart-contracts)).
- `ci/docs-generate.ts`: used to generate the user and dev docs into separate JSON files (this is used as part of our release CI to prepare the package when publishing it on [npmjs.org](https://www.npmjs.com/package/@lukso/lsp-smart-contracts)).
- `fix_flattener.js`: utility file to remove duplicate

## `deploy-verify.sh`
Expand Down

0 comments on commit 60da94f

Please sign in to comment.