generated from actions/typescript-action
-
-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (33 loc) · 1.33 KB
/
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
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install
- run: npm run all
- uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: dist/**
- run: node -p "'version=' + require('./package.json').version" >> $GITHUB_OUTPUT
id: version
- uses: ./
id: parsedVersion
with:
version: ${{ steps.version.outputs.version }}
- run: git tag --force v${{ steps.parsedVersion.outputs.major }}.${{ steps.parsedVersion.outputs.minor }}.${{ steps.parsedVersion.outputs.patch }}
- run: git tag --force v${{ steps.parsedVersion.outputs.major }}.${{ steps.parsedVersion.outputs.minor }}
- run: git tag --force v${{ steps.parsedVersion.outputs.major }}
- run: git tag --force 'latest'
- run: git push --force --tags origin
- uses: softprops/action-gh-release@v2
with:
name: v${{ steps.parsedVersion.outputs.major }}.${{ steps.parsedVersion.outputs.minor }}.${{ steps.parsedVersion.outputs.patch }}
tag_name: v${{ steps.parsedVersion.outputs.major }}.${{ steps.parsedVersion.outputs.minor }}.${{ steps.parsedVersion.outputs.patch }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}