aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows/npm-publish.yml
blob: 84202cb22da211bbb16d8966321db0cd09aeb859 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
  workflow_dispatch:
  push:
    tags:
      - v*
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: denoland/setup-deno@v1
        with:
          deno-version: v1.x
      - run: deno task css
      - uses: actions/setup-node@v3
        with:
          node-version: 16
          registry-url: https://registry.npmjs.org/
      - run: npm ci
      - run: |
          git config user.name "GitHub Actions Bot"
          git config user.email "<>"
      - run: |
          echo "new_version=$(echo 'v1.0.4' | cut -c 2-)" >> $GITHUB_ENV
      - run: npm version ${{env.new_version}}
      - run: npm publish --dry-run
        env:
          NODE_AUTH_TOKEN: ${{secrets.npm_token}}