Skip to content

Commit

Permalink
chore: add env var for npm tag
Browse files Browse the repository at this point in the history
  • Loading branch information
deleonio committed Oct 3, 2020
1 parent 483881d commit d44ec88
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/publish-to-npmjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
types:
- published

env:
tag: canary

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -17,64 +20,64 @@ jobs:
- name: Set up Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: "12.x"
registry-url: "https://registry.npmjs.org"
scope: "@leanup"
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
scope: '@leanup'
- name: Install and publish only @leanup/cli-core-e2e
run: |
ls -la
npm install
npm publish --access=public --tag=canary || true
npm publish --access=public --tag=${{env.tag}} || true
working-directory: packages/cli/core/e2e
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_AUTH_TOKEN }}
- name: Install and publish only @leanup/cli-core-format
run: |
npm install
npm publish --access=public --tag=canary || true
npm publish --access=public --tag=${{env.tag}} || true
working-directory: packages/cli/core/format
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_AUTH_TOKEN }}
- name: Install and publish only @leanup/cli-core-lint
run: |
npm install
npm publish --access=public --tag=canary || true
npm publish --access=public --tag=${{env.tag}} || true
working-directory: packages/cli/core/lint
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_AUTH_TOKEN }}
- name: Install and publish only @leanup/cli-core-test
run: |
npm install
npm publish --access=public --tag=canary || true
npm publish --access=public --tag=${{env.tag}} || true
working-directory: packages/cli/core/test
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_AUTH_TOKEN }}
- name: Install and publish only @leanup/cli
run: |
sleep 15
npm install
npm publish --access=public --tag=canary || true
npm publish --access=public --tag=${{env.tag}} || true
working-directory: packages/cli/core
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_AUTH_TOKEN }}
- name: Install and publish only @leanup/lib
run: |
sleep 15
npm install
npm publish --access=public --tag=canary || true
npm publish --access=public --tag=${{env.tag}} || true
working-directory: packages/lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_AUTH_TOKEN }}
- name: Install and publish non @leanup/cli, @leanup/cli-core-e2e, @leanup/cli-core-format, @leanup/cli-core-lint, @leanup/cli-core-test and @leanup/lib
run: |
sleep 15
npx lerna exec --ignore @template/* --ignore @leanup/cli --ignore @leanup/cli-core-e2e --ignore @leanup/cli-core-format --ignore @leanup/cli-core-lint --ignore @leanup/cli-core-test --ignore @leanup/lib --stream -- npm install
npx lerna exec --ignore @template/* --ignore @leanup/cli --ignore @leanup/cli-core-e2e --ignore @leanup/cli-core-format --ignore @leanup/cli-core-lint --ignore @leanup/cli-core-test --ignore @leanup/lib --no-bail --stream -- npm publish --access=public --tag=canary || true
npx lerna exec --ignore @template/* --ignore @leanup/cli --ignore @leanup/cli-core-e2e --ignore @leanup/cli-core-format --ignore @leanup/cli-core-lint --ignore @leanup/cli-core-test --ignore @leanup/lib --no-bail --stream -- npm publish --access=public --tag=${{env.tag}} || true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_AUTH_TOKEN }}
- name: Test all framework variants
run: sh wake-up-all.sh canary
run: sh wake-up-all.sh ${{env.tag}}
working-directory: scripts
- name: Tag all packages as latest
run: sh dist-tag-all.sh canary latest
run: sh dist-tag-all.sh ${{env.tag}} latest
working-directory: scripts

0 comments on commit d44ec88

Please sign in to comment.