From ace547680c3f0d2b9d21ff2e94c4785e8781a2ae Mon Sep 17 00:00:00 2001 From: Mike Bender Date: Tue, 21 Sep 2021 15:30:31 -0400 Subject: [PATCH 1/2] Use my deploy token, and deploy to npmjs instead --- .github/workflows/publish-nightly.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/publish-nightly.yml b/.github/workflows/publish-nightly.yml index f4b20ed39b..031b1cbf78 100644 --- a/.github/workflows/publish-nightly.yml +++ b/.github/workflows/publish-nightly.yml @@ -30,13 +30,11 @@ jobs: packages: write steps: - uses: actions/checkout@v2 - # Setup .npmrc file to publish to GitHub Packages - uses: actions/setup-node@v2 with: node-version: '12.x' - registry-url: 'https://npm.pkg.github.com' - run: npm install - run: npm run build - run: ./node_modules/.bin/lerna publish --canary --preid beta --dist-tag nightly --registry https://npm.pkg.github.com --yes env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN_MOFOJED }} From 849fa75b12271ebaf8817d53d76ac30b7c402ed1 Mon Sep 17 00:00:00 2001 From: Mike Bender Date: Tue, 21 Sep 2021 15:45:07 -0400 Subject: [PATCH 2/2] - Update publish-alpha action to default registry - Add publish-packages action that can be triggered to publish a release --- .github/workflows/publish-alpha.yml | 6 ++---- .github/workflows/publish-nightly.yml | 2 +- .github/workflows/publish-packages.yml | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/publish-packages.yml diff --git a/.github/workflows/publish-alpha.yml b/.github/workflows/publish-alpha.yml index 41b023688a..a445cc5931 100644 --- a/.github/workflows/publish-alpha.yml +++ b/.github/workflows/publish-alpha.yml @@ -11,7 +11,7 @@ on: required: false default: '' jobs: - build: + build-alpha: runs-on: ubuntu-latest permissions: contents: read @@ -20,13 +20,11 @@ jobs: - uses: actions/checkout@v2 with: ref: ${{ github.event.inputs.ref }} - # Setup .npmrc file to publish to GitHub Packages - uses: actions/setup-node@v2 with: node-version: '12.x' - registry-url: 'https://npm.pkg.github.com' - run: npm install - run: npm run build - run: ./node_modules/.bin/lerna publish --canary --preid ${{ github.event.inputs.preid }} --registry https://npm.pkg.github.com --yes env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN_MOFOJED }} diff --git a/.github/workflows/publish-nightly.yml b/.github/workflows/publish-nightly.yml index 031b1cbf78..00de65ad41 100644 --- a/.github/workflows/publish-nightly.yml +++ b/.github/workflows/publish-nightly.yml @@ -21,7 +21,7 @@ jobs: name: check latest commit is less than a day if: ${{ github.event_name == 'schedule' }} run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false" - build: + build-nightly: needs: check_date if: ${{ needs.check_date.outputs.should_run != 'false' }} runs-on: ubuntu-latest diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml new file mode 100644 index 0000000000..81cfd153e5 --- /dev/null +++ b/.github/workflows/publish-packages.yml @@ -0,0 +1,20 @@ +name: Node.js Publish Packages +on: workflow_dispatch +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.inputs.ref }} + - uses: actions/setup-node@v2 + with: + node-version: '12.x' + - run: npm install + - run: npm run build + - run: ./node_modules/.bin/lerna publish --yes + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN_MOFOJED }}