Merge pull request #52 from iniquitybbs/dependabot/npm_and_yarn/packa… #253
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: Release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16] | |
steps: | |
- uses: actions/checkout@v2 | |
# https://raulmelo.dev/til/when-publishing-npm-packages-with-lerna-through-gh-actions-we-need-more-params-to-checkout | |
with: | |
fetch-depth: "0" | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Git Identity | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Release | |
run: | | |
npm i -g npm@7 | |
npm i -g lerna | |
lerna bootstrap | |
lerna run build | |
lerna publish --canary --yes | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |