|
1 | | -name: CI |
2 | | -on: [push, pull_request] |
3 | | -jobs: |
4 | | - CI: |
5 | | - runs-on: ubuntu-latest |
6 | | - permissions: |
7 | | - contents: read |
8 | | - id-token: write |
9 | | - steps: |
10 | | - - uses: actions/checkout@v4 |
11 | | - - uses: denoland/setup-deno@v1 |
12 | | - with: |
13 | | - deno-version: v1.x |
14 | | - - name: Test |
15 | | - run: deno test --allow-net --allow-read=. |
16 | | - - name: Publish on tag |
17 | | - run: deno run -A jsr:@david/publish-on-tag@0.1.4 |
18 | | - - name: Get tag version |
19 | | - if: startsWith(github.ref, 'refs/tags/') |
20 | | - id: get_tag_version |
21 | | - run: echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//} |
22 | | - - uses: actions/setup-node@v4 |
23 | | - with: |
24 | | - node-version: '20.x' |
25 | | - registry-url: 'https://registry.npmjs.org' |
26 | | - - name: npm build |
27 | | - run: deno task build:npm ${{steps.get_tag_version.outputs.TAG_VERSION}} |
28 | | - - name: npm publish |
29 | | - if: startsWith(github.ref, 'refs/tags/') |
30 | | - env: |
31 | | - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
32 | | - run: | |
33 | | - cd npm |
34 | | - npm publish --access public |
| 1 | +name: CI |
| 2 | +on: [push, pull_request] |
| 3 | +jobs: |
| 4 | + CI: |
| 5 | + runs-on: ubuntu-latest |
| 6 | + permissions: |
| 7 | + contents: read |
| 8 | + id-token: write |
| 9 | + steps: |
| 10 | + - uses: actions/checkout@v6 |
| 11 | + - uses: denoland/setup-deno@v2 |
| 12 | + - name: Test |
| 13 | + run: deno test --allow-net --allow-read=. |
| 14 | + - name: Publish on tag |
| 15 | + run: deno run -A jsr:@david/publish-on-tag@0.2.0 |
| 16 | + - name: Get tag version |
| 17 | + if: startsWith(github.ref, 'refs/tags/') |
| 18 | + id: get_tag_version |
| 19 | + run: echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//} |
| 20 | + - uses: actions/setup-node@v6 |
| 21 | + with: |
| 22 | + node-version: "24.x" |
| 23 | + registry-url: "https://registry.npmjs.org" |
| 24 | + - name: npm build |
| 25 | + run: deno task build:npm ${{steps.get_tag_version.outputs.TAG_VERSION}} |
| 26 | + - name: npm publish |
| 27 | + if: startsWith(github.ref, 'refs/tags/') |
| 28 | + run: | |
| 29 | + cd npm |
| 30 | + npm publish --access public |
0 commit comments