diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 226da4c..83ad323 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,7 +5,7 @@ on: types: [created] jobs: - build: + check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -13,12 +13,33 @@ jobs: with: node-version: 18 cache: npm - registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm run lint - run: npm run typecheck - run: npm test - - run: npx jsr publish + publish-npm: + needs: check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + registry-url: https://registry.npmjs.org/ - run: npm publish --access=public env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + publish-jsr: + needs: check + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + - run: npx jsr publish