chore(workflows): use GITHUB_OUTPUT instead of ::set-output (#85) #96
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: | |
- main | |
- beta | |
jobs: | |
checkCommit: | |
name: Check commit | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
steps: | |
- id: commit | |
run: echo "message=${{ github.event.head_commit.message }}" >> $GITHUB_OUTPUT | |
outputs: | |
commitMsg: ${{ steps.commit.outputs.message }} | |
release: | |
name: Release | |
needs: [checkCommit] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '18' | |
- name: Install yarn | |
run: |- | |
NODE_ENV=development yarn | |
- name: Test packages | |
run: yarn test | |
- name: Release packages | |
env: | |
NODE_ENV: production | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: |- | |
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> $HOME/.npmrc 2> /dev/null | |
yarn lerna:deploy -- "${{ needs.checkCommit.outputs.commitMsg }}" |