fix action #20
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: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: | | |
npm install -g jest typescript | |
npm install --save-dev ts-jest @types/jest | |
- name: Run tests | |
run: jest --coverage | |
- name: Reset repository | |
id: reset_repo | |
run: git reset --hard HEAD | |
- name: Publish package | |
run: npx jsr publish | |
if: ${{ steps.reset_repo.outcome == 'success' }} |