Publish pre-release #28
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: Publish pre-release | |
on: workflow_dispatch | |
# No push trigger events because PAT, use here, will do a recursive workflow run | |
env: | |
NODE_VERSION: 16.x | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'AxaFrance' | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.PUSH_PAT }} | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: 'https://registry.npmjs.org' | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run build | |
- run: npm run check | |
- run: | | |
git config user.name "Build-CI" | |
git config user.email [email protected] | |
- name: Create new pre release | |
run: npx lerna version prerelease --exact --force-publish --yes --no-push | |
- run: | | |
git push | |
git push --tags origin | |
- name: Publish pre-release packages to npm | |
run: npx lerna publish from-package --dist-tag next --yes --registry https://registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |