-
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 961 Bytes
/
publish.yml
File metadata and controls
37 lines (35 loc) · 961 Bytes
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
name: publish
on:
push:
tags:
- "v*"
jobs:
tests:
uses: ./.github/workflows/tests.yml
publish-npm:
needs: [tests]
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC
steps:
- uses: actions/checkout@v4
- name: Set Go version from .prototools
id: set_go_version
run: |
GO_VERSION=$(grep '^go' .prototools | grep -o '".*"' | tr -d '"')
echo "GO_VERSION=$GO_VERSION" >> $GITHUB_ENV
- name: go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Publish to npm
run: | # npm 11.15.1 for OIDC support
npm install -g npm@11
npm ci
npm install
npm publish