This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
Public Packages publish workflow #263
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Public Packages publish workflow | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install npm v8 | |
run: npm install -g npm@8 | |
- name: Install dependencies | |
run: npm install | |
- name: Lerna link | |
run: npm run link | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.PUBLIC_NPM_NODE_AUTH_TOKEN}} | |
- name: Lerna bootstrap | |
run: npm run bootstrap | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.PUBLIC_NPM_NODE_AUTH_TOKEN}} | |
- name: Lerna checkLicenses | |
run: npm run checkLicenses | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.PUBLIC_NPM_NODE_AUTH_TOKEN}} | |
- name: Build the package | |
run: npm run build | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.PUBLIC_NPM_NODE_AUTH_TOKEN}} | |
- name: Lint packages | |
run: npm run lint | |
- name: Run tests | |
run: npm test | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.PUBLIC_NPM_NODE_AUTH_TOKEN}} | |
TEST_SECRETS: ${{secrets.INTEGRATION_TEST_SECRETS}} | |
TESTMAIL_API_KEY: ${{secrets.TESTMAIL_API_KEY}} | |
TESTMAIL_NS: ${{secrets.TESTMAIL_NS}} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: "https://registry.npmjs.org" | |
scope: "@affinidi" | |
- name: Install npm v8 | |
run: npm install -g npm@8 | |
- name: Publish to npmjs.org | |
# more info: https://github.com/lerna/lerna/issues/2788 | |
run: npm run publish from-package -- --yes --registry https://registry.npmjs.org/ --no-verify-access | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.PUBLIC_NPM_NODE_AUTH_TOKEN}} | |
TEST_SECRETS: ${{secrets.INTEGRATION_TEST_SECRETS}} | |
TESTMAIL_API_KEY: ${{secrets.TESTMAIL_API_KEY}} | |
TESTMAIL_NS: ${{secrets.TESTMAIL_NS}} |