-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (51 loc) · 1.52 KB
/
release.yml
File metadata and controls
55 lines (51 loc) · 1.52 KB
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
name: Release
on:
push:
branches:
- 'main'
permissions:
contents: write
id-token: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Clone repository
uses: actions/checkout@v6
with:
fetch-depth: '0'
token: ${{ secrets.TOKEN_GITHUB_TO_GITHUB_REPOSITORIES_RW }}
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: 24.x
- name: Install dependencies
run: |
npm ci
- name: Run QA
run: |
npm run qa
- name: Get next version
id: get_next_version
uses: thenativeweb/get-next-version@2.7.1
- name: Create new version
if: ${{ steps.get_next_version.outputs.hasNextVersion == 'true' }}
run: |
npm version --no-git-tag-version ${{ steps.get_next_version.outputs.version }}
git config --global user.email "hello@thenativeweb.io"
git config --global user.name "${{ github.actor }}"
git add .
git commit -m 'chore: Bump version to ${{ steps.get_next_version.outputs.version }}. [skip ci]'
git push
git tag ${{ steps.get_next_version.outputs.version }}
git push origin ${{ steps.get_next_version.outputs.version }}
- name: Build artifacts
if: ${{ steps.get_next_version.outputs.hasNextVersion == 'true' }}
run: |
npm run build
- name: Publish new version
if: ${{ steps.get_next_version.outputs.hasNextVersion == 'true' }}
run: |
npm publish