Merge pull request #12 from inaiat/feat/safe-async-result #18
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 | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install corepack | |
run: npm install -g corepack && corepack enable | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build and test | |
run: pnpm build && pnpm test | |
- name: Publish package | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# - name: Publish package on JSR | |
# run: pnpm dlx jsr publish | |