-
Notifications
You must be signed in to change notification settings - Fork 58
57 lines (50 loc) · 1.52 KB
/
release-action.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
name: "Release Action"
on:
workflow_run:
workflows: [Create New Release]
types:
- completed
jobs:
release-action:
name: "Create Release"
runs-on: "ubuntu-latest"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.repository.default_branch }}
- name: Get the latest tag
id: get_tag
run: |
echo "LATEST_TAG=$(git tag --sort=-creatordate | head -n 1)" >> $GITHUB_ENV
- name: Install ZIP
run: sudo apt install zip
- name: Bundle files
run: |
mkdir -p ./temp/cw-racingapp
rsync -av --progress ./* ./temp/cw-racingapp \
--exclude .git \
--exclude .github \
--exclude temp \
--exclude node_modules
cd ./temp && zip -r ../cw-racingapp.zip ./cw-racingapp
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.LATEST_TAG }}
includeInvalidCommits: true
writeToFile: false
- name: Create Release
uses: ncipollo/[email protected]
with:
allowUpdates: true
draft: false
makeLatest: true
name: ${{ env.LATEST_TAG }}
tag: ${{ env.LATEST_TAG }}
body: ${{ steps.changelog.outputs.changes }}
artifacts: cw-racingapp.zip
token: ${{ secrets.GITHUB_TOKEN }}