-
-
Notifications
You must be signed in to change notification settings - Fork 213
49 lines (42 loc) · 1.74 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
name: "Release"
on:
release:
types:
- released
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Update release notes"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: python .github/workflow_data/release.py
- name: "Download release assets from tag build"
run: |
set -e
wget "${{ secrets.INDEXER_URL }}"/firmware/${{ github.event.release.tag_name }}/flipper-z-f7-update-${{ github.event.release.tag_name }}.tgz
wget "${{ secrets.INDEXER_URL }}"/firmware/${{ github.event.release.tag_name }}/flipper-z-f7-update-${{ github.event.release.tag_name }}.zip
wget "${{ secrets.INDEXER_URL }}"/firmware/${{ github.event.release.tag_name }}/flipper-z-f7-sdk-${{ github.event.release.tag_name }}.zip
- name: "Update release with assets and notes"
uses: "softprops/action-gh-release@v1"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
body_path: .github/workflow_data/release.md
files: |
flipper-z-f7-update-${{ github.event.release.tag_name }}.tgz
flipper-z-f7-update-${{ github.event.release.tag_name }}.zip
flipper-z-f7-sdk-${{ github.event.release.tag_name }}.zip
- name: "Trigger reindex"
run: |
curl --fail -L -H "Token: ${{ secrets.INDEXER_TOKEN }}" \
"${{ secrets.INDEXER_URL }}"/firmware/reindex;
- name: "Send release notification"
env:
RELEASE_WEBHOOK: ${{ secrets.RELEASE_WEBHOOK }}
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: python .github/workflow_data/webhook.py