-
-
Notifications
You must be signed in to change notification settings - Fork 7
40 lines (34 loc) · 1.28 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
name: Package and release
on:
push:
tags:
- '**'
workflow_dispatch: # so we can trigger it from another workflow
permissions:
contents: write # required to create a release
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Clone project
uses: actions/checkout@v4
- name: Trim changelog
run: sed -ni '1p;2,/^###/{/^###/q;p;}' CHANGELOG.md
- name: Package and release
uses: BigWigsMods/packager@v2
if: github.ref_type == 'tag' # ensure no rogue triggers
env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}
WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }}
- name: Notify on failures
# when triggered by another workflow we won't get notifications from failures, this is a workaround
if: ${{ failure() }}
uses: appleboy/[email protected]
with:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
message: |
Workflow "${{ github.workflow }}" failed during job "${{ github.job }}"
<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>