-
Notifications
You must be signed in to change notification settings - Fork 3
executable file
·73 lines (61 loc) · 1.98 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
name: Package and release
# we need to let GitHub know _when_ we want to release, which is only when we create a new tag.
on:
push:
tags:
- "**"
jobs:
LUA:
runs-on: ubuntu-latest
steps:
- name: Check LUA
uses: Krealle/luals-check-action@v1
with:
config-path: .vscode/settings.json
release:
runs-on: ubuntu-latest
needs: LUA
outputs:
changeLogText: ${{ steps.readChanglog.outputs.text }}
# "steps" holds a list of all the steps needed to package and release our AddOn
steps:
- name: Clone Project
uses: actions/checkout@v4
with:
fetch-depth: 0 # gets git history for changelogs
- name: Hack around https://github.com/actions/checkout/issues/290
run: |
git fetch --tags --force
- name: Generate Changelog
id: Changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./generate_changelog.sh
- name: Save Changelog in Variable
uses: Stanzilla/[email protected]
id: readChanglog
with:
path: CHANGELOG.md
# once cloned, we just run the GitHub Action for the packager project
- name: Package and release
env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}
uses: BigWigsMods/packager@v2
discord-release-notification:
runs-on: ubuntu-latest
needs: release
env:
MESSAGE: "New Cell UnitFrames Release"
steps:
- name: Send Discord Notification
id: discord
uses: tsickert/[email protected]
if: success()
with:
webhook-url: ${{ secrets.RELEASE_WEBHOOK_URL }}
embed-title: ${{ env.MESSAGE }}
embed-url: https://github.com/Krealle/Cell_UnitFrames/releases/latest
embed-description: ${{needs.release.outputs.changeLogText}}
content: "<@&1278369314604322921>"