-
-
Notifications
You must be signed in to change notification settings - Fork 72
44 lines (38 loc) · 1.19 KB
/
release-created.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
name: Release Created
on:
release:
types: [published]
jobs:
validate-version:
runs-on: ubuntu-latest
steps:
- name: Validate version using the API
shell: bash
run: |
RESULT=$(curl -s "https://update.api.macro-deck.app/versionname/validate/${{ github.event.release.name }}")
if [[ "$RESULT" != "true" ]]; then
echo "Version '${{ github.event.release.name }}' is not valid according to the update API."
exit 1
fi
tests:
name: Execute Tests
uses: ./.github/workflows/tests.yml
secrets: inherit
release-windows:
name: "Build and Push Macro Deck for Windows"
uses: ./.github/workflows/build-push-windows.yml
needs: [tests]
secrets: inherit
with:
version: ${{ github.event.release.name }}
branch: ${{ github.event.release.target_commitish }}
notify:
name: "Notify"
runs-on: ubuntu-latest
needs: [release-windows]
steps:
- uses: Macro-Deck-App/Actions/discord-notify-release@main
with:
version: ${{ github.event.release.name }}
is-beta: ${{ github.event.release.prerelease }}
webhook-token: ${{ secrets.WEBHOOK_KEY }}