-
Notifications
You must be signed in to change notification settings - Fork 2
169 lines (141 loc) · 3.97 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
165
166
167
168
169
name: CI
on:
pull_request:
workflow_dispatch:
inputs:
versionName:
description: "Release version"
required: true
isDraft:
description: "Draft release"
required: false
default: "true"
defaults:
run:
shell: bash -eux {0}
jobs:
build_centos7_rpms:
name: Build Centos 7 RPMs
runs-on: ubuntu-latest
container:
image: centos:7
steps:
- name: Cancel Workflow Action
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout sources
uses: actions/checkout@v3
- name: Install dependencies
run: yum install -y gcc make rpm-build
- name: Install latest rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
- name: Build
run: make rpm
- name: Summary
run: |
find _rpm -type f -name \*.rpm -print -exec rpm -qivlp {} \;
- name: Upload RPMs
uses: actions/upload-artifact@v2
with:
name: centos7_rpm
retention-days: 1
path: _rpm/RPMS/**/*.rpm
build_rocky8_rpms:
name: Build Rockylinux 8 RPMs
runs-on: ubuntu-latest
container:
image: rockylinux:8
steps:
- name: Cancel Workflow Action
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout sources
uses: actions/checkout@v3
- name: Install dependencies
run: dnf install -y gcc make rpm-build
- name: Install latest rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
- name: Build
run: make rpm
- name: Summary
run: |
find _rpm -type f -name \*.rpm -print -exec rpm -qivlp {} \;
- name: Upload RPMs
uses: actions/upload-artifact@v2
with:
name: rocky8_rpm
retention-days: 1
path: _rpm/RPMS/**/*.rpm
build_ubuntu20_debs:
name: Build Ubuntu 20.04 DEBs
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
steps:
- name: Cancel Workflow Action
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout sources
uses: actions/checkout@v3
- name: Install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y curl fakeroot
apt-get build-dep -y .
- name: Install latest rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
- name: Build
run: make deb
- name: Summary
run: |
find _deb -type f -name \*.deb -print -exec dpkg -I {} \; -exec dpkg -c {} \;
- name: Upload DEBs
uses: actions/upload-artifact@v2
with:
name: ubuntu20_debs
retention-days: 1
path: _deb/*.deb
release:
if: github.event_name == 'workflow_dispatch'
name: Release
needs: [build_centos7_rpms, build_rocky8_rpms, build_ubuntu20_debs]
runs-on: ubuntu-latest
steps:
- name: Download Centos 7 RPMs
uses: actions/download-artifact@v3
with:
name: centos7_rpm
- name: Download Rockylinux 8 RPMs
uses: actions/download-artifact@v3
with:
name: rocky8_rpm
- name: Download Ubuntu 20.04 DEBs
uses: actions/download-artifact@v3
with:
name: ubuntu20_debs
- name: Summary
run: find -ls
- name: Publish
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.inputs.versionName }}
draft: ${{ github.event.inputs.isDraft }}
files: |
**/*.rpm
**/*.deb