-
-
Notifications
You must be signed in to change notification settings - Fork 36
53 lines (51 loc) · 1.66 KB
/
release.yml
File metadata and controls
53 lines (51 loc) · 1.66 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
name: Create a release
on:
workflow_dispatch:
inputs:
version:
type: choice
description: 'Version to bump'
required: true
options:
- 'patch'
- 'minor'
- 'major'
tag:
type: choice
description: 'Tag'
required: true
options:
- 'alpha'
- 'beta'
- 'latest'
jobs:
release:
name: Release new version
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.bump_version.outputs.NEW_TAG }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github"
- id: bump_version
run: echo "NEW_TAG=$(npm version ${{ inputs.version }})" >> $GITHUB_OUTPUT
- run: git push --follow-tags
github_release:
name: Create a release
runs-on: ubuntu-latest
needs: release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- run: gh release create ${{ needs.release.outputs.new_tag }} --draft --verify-tag