update node version #465
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: CI | |
on: [push, pull_request] | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
action: [build, lint, test] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- run: npm install | |
- run: npm run ${{ matrix.action }} | |
release: | |
name: Release | |
needs: check | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
registry-url: https://registry.npmjs.org | |
- name: Determine Release Information | |
id: release-info | |
uses: ./.github/actions/release-info | |
- name: Install Dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Set Version | |
run: npm version ${{ steps.release-info.outputs.version }} --git-tag-version=false | |
- name: Publish | |
run: | | |
args=( --tag="${{ steps.release-info.outputs.distTag }}" ) | |
if [ -z "${NODE_AUTH_TOKEN}" ]; then | |
echo "Auth token not found. Executing dry run publish." | |
args+=( --dry-run ) | |
fi; | |
mv dist/core core; | |
npm publish "${args[@]}" | |
if [ -z "${NODE_AUTH_TOKEN}" ]; then | |
echo "Dry run publish complete." | |
fi; | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |