-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (44 loc) · 1.37 KB
/
publish_release.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
37
38
39
40
41
42
43
44
name: Publish Release
run-name: Publish to NPM registry, upgrade version (package.json and git tag), update changelog and create Github Release
on:
push:
branches:
- feature/14-automatize-the-publish-of-versions # REPLACE BY master after checking
jobs:
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- uses: actions/cache@v4
with:
path: 'node_modules'
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn test
Publish-Package:
needs: [Test]
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- uses: actions/cache@v4
with:
path: 'node_modules'
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn release
env:
NPM_TOKEN: ${{ secrets.NPM_K14V_PUBLISH_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}