-
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (74 loc) · 2.8 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: release
on:
push:
branches:
- 'releases/*'
workflow_dispatch:
jobs:
release:
runs-on: macos-14
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT }}
- run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
- uses: actions/setup-node@v4
with:
node-version: 18
- run: |
npm install -g [email protected]
pnpm install
- run: |
node docs/software_lists.mjs
git add README.md
git diff --cached --quiet || (git commit -m "docs: update software lists" && git push origin ${{ github.ref }})
env:
CI: true
- uses: technote-space/toc-generator@v4
with:
FOLDING: 'true'
- uses: TriPSs/conventional-changelog-action@v5
id: changelog
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
release-count: 0
skip-git-pull: 'true'
- run: |
export APP_VERSION=$(node -p "require('./package.json').version")
npm run production
- run: ls ./dist
- uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist
- uses: ncipollo/release-action@v1
id: release
if: steps.changelog.outputs.skipped != 'true'
with:
allowUpdates: true
artifacts: 'dist/env-setup-*'
body: ${{ steps.changelog.outputs.clean_changelog }}
draft: false
generateReleaseNotes: true
name: ${{ steps.changelog.outputs.tag }}
prerelease: false
tag: ${{ steps.changelog.outputs.tag }}
token: ${{ secrets.PAT }}
- name: Update download links
if: steps.release.outputs.id != ''
run: |
node docs/download_links.mjs
git add README.md
git diff --cached --quiet || (git commit -m "docs: update download links" && git push origin ${{ github.ref }})
- name: Merge release branch
if: steps.release.outputs.id != ''
run: |
git checkout main
git pull
git merge --no-ff --no-edit ${{ github.ref }}
git push