-
Notifications
You must be signed in to change notification settings - Fork 7
81 lines (70 loc) · 2.58 KB
/
release-workflow.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
---
name: Create Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
# Push events to matching v*, i.e. v1.0, v20.15.10
- 'v*'
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@master
- name: Set Variables
id: variables
run: |
version_id=${GITHUB_REF_NAME:1}
package_name=${GITHUB_REPOSITORY##*/}
echo "version_id=$version_id" >> $GITHUB_OUTPUT
echo "package_name=$package_name" >> $GITHUB_OUTPUT
- name: Build DEB Package for Ubuntu
id: deb_build_ubuntu
uses: cnangel/build-deb-action@master
with:
before_build_hook: |
dch --maintmaint --newversion ${{ steps.variables.outputs.version_id }}-1 "verion ${{ steps.variables.outputs.version_id }}"
dch --maintmaint --release ""
buildpackage_opts: --build=binary
is_output_all_files: false
- name: Build RPM Package for CentOS7
id: rpm_build_centos7
uses: cnangel/rpmbuild@centos7
with:
spec_file: "${{ steps.variables.outputs.package_name }}.spec"
- name: Build RPM Package for CentOS8
id: rpm_build_centos8
uses: cnangel/rpmbuild@centos8
with:
spec_file: "${{ steps.variables.outputs.package_name }}.spec"
- name: Build RPM Package for CentOS9
id: rpm_build_centos9
uses: cnangel/rpmbuild@centos9
with:
spec_file: "${{ steps.variables.outputs.package_name }}.spec"
- name: Build RPM Package for Fedora38
id: rpm_build_fedora38
uses: cnangel/rpmbuild@fedora/38
with:
spec_file: "${{ steps.variables.outputs.package_name }}.spec"
- name: Release ${{ github.ref_name }}
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
name: Release ${{ github.ref_name }}
body: |
Changes in this Release ${{ github.ref_name }}
- Create DEB and RPM
- Upload DEB, Source RPM and RPMS
files: |
README,COPYING,ChangeLog
${{ steps.deb_build_ubuntu.outputs.deb_dir_names }}
${{ steps.rpm_build_centos7.outputs.rpm_dir_names }}
${{ steps.rpm_build_centos8.outputs.rpm_dir_names }}
${{ steps.rpm_build_centos9.outputs.rpm_dir_names }}
${{ steps.rpm_build_fedora38.outputs.rpm_dir_names }}
token: ${{ secrets.SSE_TOKEN }}
draft: false
prerelease: false