ci: build on node@20 #21
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 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: {} | |
permissions: | |
actions: write | |
contents: write | |
issues: write | |
pull-requests: write | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
release: | |
name: π Test and Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.11.0 | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v3 | |
- name: β Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: π₯ Download deps | |
uses: bahmutov/npm-install@v1 | |
- name: π Run test | |
run: npm test | |
- name: βοΈ Semantic Release | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |