name: Release on: push: tags: - "*" concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: release: name: Release runs-on: ubuntu-latest strategy: matrix: deno: ["1.x"] node: ["18"] steps: - name: Checkout Repo uses: actions/checkout@v3 - uses: denoland/setup-deno@v1 with: deno-version: ${{ matrix.deno }} - name: Get tag version if: startsWith(github.ref, 'refs/tags/') id: get_tag_version run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - uses: pnpm/action-setup@v2 with: version: latest - name: npm build run: deno task npm ${{steps.get_tag_version.outputs.TAG_VERSION}} - name: npm publish if: startsWith(github.ref, 'refs/tags/') env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: cd npm && npm publish