-
-
Notifications
You must be signed in to change notification settings - Fork 22
125 lines (120 loc) · 3.81 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Release
on:
workflow_run:
workflows: ["Build"]
types:
- completed
jobs:
release:
runs-on: ubuntu-20.04
steps:
- name: Download VERSION
uses: dawidd6/action-download-artifact@v2
with:
workflow: init.yml
name: version
- name: Add VERSION to environment
run: |
echo "VERSION=$(<version.txt)" >> $GITHUB_ENV
- name: Download BUILD_NUMBER
uses: dawidd6/action-download-artifact@v2
with:
workflow: init.yml
name: build_number
- name: Add BUILD_NUMBER to environment
run: |
echo "BUILD_NUMBER=$(<build_number.txt)" >> $GITHUB_ENV
- name: Download Windows x64 msi
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
name: windows-msi-x64
path: target/install
- name: Download Windows x86 msi
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
name: windows-msi-x86
path: target/install
- name: Download Linux x64 deb
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
name: linux-deb-x64
path: target/install
- name: Download Linux x64 rpm
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
name: linux-rpm-x64
path: target/install
- name: Download Linux x64 AppImage
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
name: linux-app-image-x64
path: target/install
- name: Download Linux x86 deb
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
name: linux-deb-x86
path: target/install
- name: Download Linux x86 rpm
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
name: linux-rpm-x86
path: target/install
- name: Download Linux x86 AppImage
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
name: linux-app-image-x86
path: target/install
- name: Download Linux aarch64 zip
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
name: linux-zip-aarch64
path: target/install
- name: Download Linux arm32 ZIP
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
name: linux-zip-arm32
path: target/install
- name: Download MacOS x64 pkg
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
name: macos-pkg-x64
path: target/install
- name: Delete old release if exists
uses: dev-drprasad/delete-tag-and-release@v0.2.0
continue-on-error: true
with:
delete_release: true
tag_name: ${{ env.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release body
run: |
touch body.md
echo Build Number : \`$BUILD_NUMBER\` >> body.md
if [[ $VERSION == *"SNAPSHOT"* ]]; then
echo "**These are snapshot builds. Untested and not recommended for daily use.**" >> body.md
echo "PRE_RELEASE=true" >> $GITHUB_ENV
else
echo "PRE_RELEASE=false" >> $GITHUB_ENV
fi
- name: Release nightly build
uses: ncipollo/release-action@v1.8.6
with:
allowUpdates: true
name: ${{ env.VERSION }}
artifacts: target/install/*
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.VERSION }}
bodyFile: "body.md"
prerelease: ${{ env.PRE_RELEASE }}