-
Notifications
You must be signed in to change notification settings - Fork 161
80 lines (78 loc) · 2.31 KB
/
on_push.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
74
75
76
77
78
79
80
name: Push handler
on:
push:
jobs:
firmware_pipeline:
name: Build Firmware
permissions:
packages: write
contents: read
uses: ./.github/workflows/build_firmware.yml
client_pipeline:
name: Build Firmware
uses: ./.github/workflows/build_client.yml
create_dev_release:
permissions:
contents: write
name: Create dev pre-release with artifacts
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs:
- firmware_pipeline
- client_pipeline
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Download release artifacts
uses: actions/download-artifact@v3
with:
name: release-artifacts
path: release-artifacts
- name: Upload to dev release
uses: softprops/action-gh-release@v1
with:
body: |
Auto-Generated DFU packages from latest `main` commit.
For development purposes only.
These are not tested, here be dragons.
Built from commit ${{ github.sha }}
tag_name: dev
name: Development release
draft: false
prerelease: true
target_commitish: ${{ github.sha }}
generate_release_notes: true
files: release-artifacts/*
- name: Fix up release tag
run: |
git tag -f dev
git push --tags -f
create_release:
permissions:
contents: write
name: Create tagged release with artifacts
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs:
- firmware_pipeline
- client_pipeline
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Download release artifacts
uses: actions/download-artifact@v3
with:
name: release-artifacts
path: release-artifacts
- name: Upload to tagged release
uses: softprops/action-gh-release@v1
with:
body: |
Auto-Generated DFU packages for Release ${{ github.ref_name }}
Built from commit ${{ github.sha }}
name: Release ${{ github.ref_name }}
draft: false
target_commitish: ${{ github.sha }}
generate_release_notes: true
append_body: true
files: release-artifacts/*