-
-
Notifications
You must be signed in to change notification settings - Fork 106
99 lines (88 loc) · 3.42 KB
/
publish.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Publish Pre Release
on:
workflow_call:
inputs:
tag:
required: true
type: string
branch:
type: string
workflow_dispatch:
inputs:
run-id:
required: true
tag:
type: choice
options:
- nightly
- beta
branch:
type: choice
options:
- release/1.1
- release/1.2
- community
permissions:
contents: write #required to update release tags
jobs:
publish:
name: PublishRelease
runs-on: ubuntu-latest
steps:
- name: Checkout branch #required to put the tag on the correct branch
if: inputs.branch != null
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Download Build Artifact
if: inputs.run-id == null
uses: actions/download-artifact@v4
with:
name: ${{ inputs.tag }}_Release_build_bundle
- name: Download Build Artifact
if: inputs.run-id != null
uses: actions/download-artifact@v4
with:
name: ${{ inputs.tag }}_Release_build_bundle
run-id: ${{inputs.run-id}}
- name: Create readme for archive
run: |
cat <<'END' >README.txt
Deluge Community Firmware (${{ inputs.tag }})
Git revision ${{ github.sha }}
=====================================================
See the update guide for detailed instructions on how to install this
firmware. If you have never updated your Deluge before, please make
extra sure to read this, as you might want to update your bootloader
first to not risk rendering your Deluge inoperable!
https://github.com/SynthstromAudible/DelugeFirmware/wiki/Update-guide
Also, make a backup copy of your SD card before proceeding, just for
additional safety.
More information is also available on the project's website:
https://synthstromaudible.github.io/DelugeFirmware/
If you have done firmware updates on your Deluge before, but need a
quick refresher on how to do it:
* Copy the .bin file to the top level of your SD card.
* Make sure that you have removed any other/leftover .bin files from
there, otherwise the Deluge cannot know which one to use.
* Turn your Deluge off.
* Insert the SD card.
* Hold SHIFT on the Deluge and power it back on. You can let go of
the shift key once the update has begun.
END
- name: Create nightlies archive
run: |
zip -j ./${{ inputs.tag }}.zip README.txt *.bin
- name: Update Nightly Release
uses: andelf/nightly-release@main #https://github.com/marketplace/actions/nightly-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ inputs.tag }} #will update tag to point at current head
name: 'Deluge ${{ inputs.tag }} Release $$' #will fill in with date
prerelease: true
body: |
This is a ${{ inputs.tag }} release and may have bugs - please [report them](https://github.com/SynthstromAudible/DelugeFirmware/issues/new/choose)!
For installation instructions, see the [update guide](https://github.com/SynthstromAudible/DelugeFirmware/wiki/Update-guide).
files: |
./${{ inputs.tag }}.zip