-
Notifications
You must be signed in to change notification settings - Fork 0
164 lines (137 loc) · 6.07 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: Release
on:
push:
tags: 'v*'
jobs:
prepare-linux:
name: Prepare Linux Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get version
id: get_version
run: |
echo "PLUGINS_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
shell: bash
- name: Build
id: build_linux_pkgs
run: |
./build-all.sh
PKG_VERSION=${PLUGINS_VERSION:1}
echo "PKG_VERSION=${PKG_VERSION}" >> $GITHUB_OUTPUT
env:
PLUGINS_VERSION: ${{ steps.get_version.outputs.PLUGINS_VERSION }}
- name: Upload RPM Package amd64
uses: actions/upload-artifact@v4
with:
name: sftpgo-plugins-${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1.x86_64.rpm
path: ./dist-amd64/rpm/sftpgo-plugins-${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1.x86_64.rpm
retention-days: 1
- name: Upload RPM Package arm64
uses: actions/upload-artifact@v4
with:
name: sftpgo-plugins-${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1.aarch64.rpm
path: ./dist-arm64/rpm/sftpgo-plugins-${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1.aarch64.rpm
retention-days: 1
- name: Upload RPM Package armv7
uses: actions/upload-artifact@v4
with:
name: sftpgo-plugins-${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1.armv7hl.rpm
path: ./dist-arm7/rpm/sftpgo-plugins-${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1.armv7hl.rpm
retention-days: 1
- name: Upload RPM Package ppc64le
uses: actions/upload-artifact@v4
with:
name: sftpgo-plugins-${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1.ppc64le.rpm
path: ./dist-ppc64le/rpm/sftpgo-plugins-${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1.ppc64le.rpm
retention-days: 1
- name: Upload Deb Package amd64
uses: actions/upload-artifact@v4
with:
name: sftpgo-plugins_${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1_amd64.deb
path: ./dist-amd64/deb/sftpgo-plugins_${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1_amd64.deb
retention-days: 1
- name: Upload Deb Package arm64
uses: actions/upload-artifact@v4
with:
name: sftpgo-plugins_${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1_arm64.deb
path: ./dist-arm64/deb/sftpgo-plugins_${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1_arm64.deb
retention-days: 1
- name: Upload Deb Package armv7
uses: actions/upload-artifact@v4
with:
name: sftpgo-plugins_${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1_armhf.deb
path: ./dist-arm7/deb/sftpgo-plugins_${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1_armhf.deb
retention-days: 1
- name: Upload Deb Package ppc64le
uses: actions/upload-artifact@v4
with:
name: sftpgo-plugins_${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1_ppc64el.deb
path: ./dist-ppc64le/deb/sftpgo-plugins_${{ steps.build_linux_pkgs.outputs.PKG_VERSION }}-1_ppc64el.deb
retention-days: 1
- name: Upload Linux bundle
uses: actions/upload-artifact@v4
with:
name: sftpgo-plugins_${{ steps.get_version.outputs.PLUGINS_VERSION }}_linux_bundle.tar.xz
path: ./bundle/sftpgo-plugins_${{ steps.get_version.outputs.PLUGINS_VERSION }}_linux_bundle.tar.xz
retention-days: 1
create-release:
name: Release
needs: [prepare-linux]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get versions
id: get_version
run: |
PLUGINS_VERSION=${GITHUB_REF/refs\/tags\//}
PKG_VERSION=${PLUGINS_VERSION:1}
echo "PLUGINS_VERSION=${PLUGINS_VERSION}" >> $GITHUB_OUTPUT
echo "PKG_VERSION=${PKG_VERSION}" >> $GITHUB_OUTPUT
shell: bash
- name: Download RPM amd64
uses: actions/download-artifact@v4
with:
name: sftpgo-plugins-${{ steps.get_version.outputs.PKG_VERSION }}-1.x86_64.rpm
- name: Download RPM arm64
uses: actions/download-artifact@v4
with:
name: sftpgo-plugins-${{ steps.get_version.outputs.PKG_VERSION }}-1.aarch64.rpm
- name: Download RPM armv7
uses: actions/download-artifact@v4
with:
name: sftpgo-plugins-${{ steps.get_version.outputs.PKG_VERSION }}-1.armv7hl.rpm
- name: Download RPM ppc64le
uses: actions/download-artifact@v4
with:
name: sftpgo-plugins-${{ steps.get_version.outputs.PKG_VERSION }}-1.ppc64le.rpm
- name: Download Deb amd64
uses: actions/download-artifact@v4
with:
name: sftpgo-plugins_${{ steps.get_version.outputs.PKG_VERSION }}-1_amd64.deb
- name: Download Deb arm64
uses: actions/download-artifact@v4
with:
name: sftpgo-plugins_${{ steps.get_version.outputs.PKG_VERSION }}-1_arm64.deb
- name: Download Deb armv7
uses: actions/download-artifact@v4
with:
name: sftpgo-plugins_${{ steps.get_version.outputs.PKG_VERSION }}-1_armhf.deb
- name: Download Deb ppc64le
uses: actions/download-artifact@v4
with:
name: sftpgo-plugins_${{ steps.get_version.outputs.PKG_VERSION }}-1_ppc64el.deb
- name: Download Linux bundle
uses: actions/download-artifact@v4
with:
name: sftpgo-plugins_${{ steps.get_version.outputs.PLUGINS_VERSION }}_linux_bundle.tar.xz
- name: Create release
run: |
gh release create "${PLUGINS_VERSION}" -t "${PLUGINS_VERSION}"
gh release upload "${PLUGINS_VERSION}" sftpgo-plugins_*.xz --clobber
gh release upload "${PLUGINS_VERSION}" sftpgo-plugins-*.rpm --clobber
gh release upload "${PLUGINS_VERSION}" sftpgo-plugins_*.deb --clobber
gh release view "${PLUGINS_VERSION}"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
PLUGINS_VERSION: ${{ steps.get_version.outputs.PLUGINS_VERSION }}