ci: CI on both Node v20-22 and Deno v2 (#47) #52
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 | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: 'Release please!' | |
id: release | |
uses: googleapis/release-please-action@v4 | |
with: | |
token: ${{ secrets.RELEASE_PLEASE_TOKEN }} | |
- name: 'Clone repository (if release)' | |
if: ${{ steps.release.outputs.release_created }} | |
uses: actions/checkout@v4 | |
- name: 'Install Node.js (if release)' | |
if: ${{ steps.release.outputs.release_created }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
registry-url: 'https://registry.npmjs.org' | |
- name: 'npm ci (if release)' | |
if: ${{ steps.release.outputs.release_created }} | |
run: npm ci | |
- name: 'npx jsr publish --allow-dirty (if release)' | |
if: ${{ steps.release.outputs.release_created }} | |
run: npx jsr publish --allow-dirty | |
- name: 'npm run compile (if release)' | |
if: ${{ steps.release.outputs.release_created }} | |
run: npm run compile | |
- name: 'npm publish (if release)' | |
if: ${{ steps.release.outputs.release_created }} | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |