-
-
Notifications
You must be signed in to change notification settings - Fork 157
175 lines (175 loc) · 5.54 KB
/
pkgdeploy.yaml
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
170
171
172
173
174
175
name: Package Deployment
on:
push:
tags:
- v4.*
- v3.*
jobs:
tests:
uses: ./.github/workflows/tests.yaml
debbuild:
name: Debian
runs-on: ubuntu-20.04
needs: tests
steps:
- name: Install Pre-requisites
run: |
sudo apt-get update -qq
sudo apt-get install -qq apt-utils build-essential gzip devscripts debhelper bats wget
- name: Build Debian Package
run: |
git clone https://github.com/wslutilities/wslu-debian builder
cd ./builder
bash ./build.sh latest debian buster
- uses: actions/upload-artifact@v4
with:
name: DebianDEBs
path: builder/pkgs
pgwbuild:
name: Pengwin
runs-on: ubuntu-20.04
needs: tests
steps:
- name: Install Pre-requisites
run: |
sudo apt-get update -qq
sudo apt-get install -qq apt-utils build-essential gzip devscripts debhelper bats wget
- name: Build Debian Package
run: |
git clone https://github.com/wslutilities/wslu-debian builder
cd ./builder
bash ./build.sh latest pengwin
- uses: actions/upload-artifact@v4
with:
name: PengwinDEBs
path: builder/pkgs
pgwspdeploy:
name: Pengwin Deploying
needs: pgwbuild
runs-on: ubuntu-20.04
container: cimg/ruby:2.7
steps:
- name: Retrive package for deployment
uses: actions/download-artifact@v4
with:
name: PengwinDEBs
path: PengwinDEBs
- run: gem install package_cloud
- name: deploy to bullseye repo
env:
PACKAGECLOUD_TOKEN: ${{ secrets.PGW_DEV_DEPLOY_KEY }}
run: package_cloud push whitewaterfoundry/wslu/debian/bullseye ./PengwinDEBs/*.deb --skip-errors
- name: deploy to bookworm
env:
PACKAGECLOUD_TOKEN: ${{ secrets.PGW_DEV_DEPLOY_KEY }}
run: package_cloud push whitewaterfoundry/wslu/debian/bookworm ./PengwinDEBs/*.deb --skip-errors
rpmobsbuild:
name: RPM - OpenSUSE Build Service
runs-on: ubuntu-20.04
needs: tests
steps:
- uses: actions/checkout@v4
- name: Install Pre-requisites
run: |
sudo apt-get update -qq
sudo apt-get install -qq build-essential tar
- name: configure
run: |
bash ./configure.sh --rpm obs
cp extras/build/rpm/obs/wslu.spec ../wslu.spec
rm -rf *
mkdir -p SOURCES
mkdir -p SPECS
cp ../wslu-*.tar.gz SOURCES
cp ../wslu.spec SPECS
- name: rpmbuild
uses: ./.github/actions/rpmbuild/
- name: moving files
run: |
mkdir obs_res
cp ../wslu-*.tar.gz obs_res
cp ../wslu.spec obs_res
- uses: actions/upload-artifact@v4
with:
name: OBS_RES
path: obs_res
obsdeploy:
name: OpenSUSE Build Service Deploying
needs: rpmobsbuild
runs-on: ubuntu-latest
steps:
- name: Retrive package for deployment
uses: actions/download-artifact@v4
with:
name: OBS_RES
path: OBS_RES
- name: Install Pre-requisites
run: |
sudo apt-get update -qq
sudo apt-get install -qq osc python3-m2crypto
- name: Install API token for osc
env:
API_TOKEN_CONTENT: ${{ secrets.OBS_API_TOKEN }}
run: |
mkdir -p "$HOME/.config/osc"
echo -e "[general]\napiurl = https://api.opensuse.org\n[https://api.opensuse.org]\nuser = wslutilities\npass = $API_TOKEN_CONTENT" > "$HOME/.config/osc/oscrc"
- name: Uploading OBS source files
run: |
osc checkout home:wslutilities
cp OBS_RES/* home:wslutilities/wslu/
cd home:wslutilities/wslu/
osc addremove
osc commit -m "Build at $(date)"
rpmcoprbuild:
name: RPM - Cool Other Package Repo
needs: tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install Pre-requisites
run: |
sudo apt-get update -qq
sudo apt-get install -qq build-essential tar
- name: configure
run: |
bash ./configure.sh --rpm copr
cp extras/build/rpm/copr/wslu.spec ../wslu.spec
rm -rf *
mkdir -p SOURCES
mkdir -p SPECS
cp ../wslu-*.tar.gz SOURCES
cp ../wslu.spec SPECS
- name: rpmbuild
uses: ./.github/actions/rpmbuild/
- name: moving files
run: |
mkdir compiled_rpms
cp SRPMS/* compiled_rpms
cp RPMS/noarch/* compiled_rpms
- uses: actions/upload-artifact@v4
with:
name: COPRRPMs
path: compiled_rpms
coprdeploy:
name: Cool Other Package Repo Deploying
needs: rpmcoprbuild
container: fedora:latest
runs-on: ubuntu-latest
steps:
- name: Retrive package for deployment
uses: actions/download-artifact@v4
with:
name: COPRRPMs
path: COPRRPMs
- name: Install API token for copr-cli
env:
API_TOKEN_CONTENT: ${{ secrets.COPR_API_TOKEN }}
run: |
mkdir -p "$HOME/.config"
echo "$API_TOKEN_CONTENT" > "$HOME/.config/copr"
- name: Install tooling for source RPM build
run: |
dnf -y install @development-tools @rpm-development-tools
dnf -y install copr-cli make
- name: Submit the build by uploading the source RPM
run: copr-cli build wslutilities/wslu COPRRPMs/*.src.rpm