-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 931 Bytes
/
build.yml
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
34
35
36
name: build
on:
release:
types: [created]
push:
branches:
- "**"
paths:
- "header-gen/**"
- "**/build.yml"
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./header-gen
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20.x"
registry-url: "https://npm.pkg.github.com"
cache: npm
cache-dependency-path: header-gen/package-lock.json
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm run ci:update-version
- run: npm run build
- run: npm publish
if: github.ref == 'refs/heads/main' || github.event_name == 'release' && github.event.action == 'created'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}