-
Notifications
You must be signed in to change notification settings - Fork 105
60 lines (48 loc) · 1.48 KB
/
release.yaml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Release
on:
workflow_dispatch:
permissions:
contents: write
id-token: write
concurrency:
group: Production
cancel-in-progress: false
env:
CI: true
DO_NOT_TRACK: '1'
jobs:
stable-version:
# https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions
permissions:
id-token: write
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN_WORKFLOW_PUBLISH }}
- uses: ./.github/actions/node
with:
working-directory: ${{ env.WORKING_DIRECTORY }}
- run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
shell: bash
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install
run: pnpm install --frozen-lockfile
- name: Generate code
run: pnpm buf generate --template buf.ts.gen.yaml
- name: Check if git is not dirty after generating files
run: git diff --no-ext-diff --exit-code
- name: Build
run: pnpm run --filter='!./studio' build
- name: Publish packages & Create Github Releases
run: |
git config --global user.email "bot@wundergraph.com"
git config --global user.name "hardworker-bot"
pnpm whoami
pnpm release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN_WORKFLOW_PUBLISH }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}