-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1.31 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
name: Node.js
on:
release:
types: [created]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.target_commitish }}
- name: Get the version
id: get_version
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- run: npm version ${{ steps.get_version.outputs.version }}
- name: Validate and extract release information
id: release
uses: manovotny/[email protected]
- name: Set node version
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
registry-url: "https://registry.npmjs.org"
- run: yarn install
- run: yarn build
- name: Release config
run: |
yarn config set -H "npmRegistries['$(yarn config get npmRegistryServer)'].npmAlwaysAuth" true
yarn config set -H "npmRegistries['$(yarn config get npmRegistryServer)'].npmAuthToken" ${{ secrets.NPM_API_TOKEN }}
- name: Publish version
run: yarn npm publish --access public