Skip to content

Commit a127a0c

Browse files
authored
Merge pull request #7 from regolith-linux/action-v0.22
Setup GitHub Actions for building and publishing package
2 parents 30f9211 + e2ca444 commit a127a0c

File tree

4 files changed

+397
-0
lines changed

4 files changed

+397
-0
lines changed

.github/workflows/prepare-release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Prepare a Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- ubuntu/v0.22.0
8+
- ubuntu/v0.32.1
9+
paths:
10+
- debian/changelog
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-24.04
19+
container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64"
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Prepare Release
25+
id: prepare
26+
uses: regolith-linux/actions/prepare-release@main
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.ORG_BROADCAST_TOKEN2 }}
29+
with:
30+
name: "i3status-rs"
31+
repo: "${{ github.server_url }}/${{ github.repository }}.git"
32+
ref: "${{ github.ref_name }}"
33+
34+
- name: Push Changes to Voulage
35+
uses: stefanzweifel/git-auto-commit-action@v5
36+
if: ${{ steps.prepare.outputs.release-exists == 'false' }}
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.ORG_BROADCAST_TOKEN2 }}
39+
with:
40+
repository: "${{ steps.prepare.outputs.voulage-path }}"
41+
branch: "main"
42+
file_pattern: "stage/testing/**"
43+
commit_message: "chore: bump i3status-rs testing to ${{ steps.prepare.outputs.release-version }}"
44+
commit_user_name: regolith-ci-bot
45+
commit_user_email: [email protected]
46+
commit_author: "regolith-ci-bot <[email protected]>"
47+
48+
- name: Release Package
49+
uses: softprops/action-gh-release@v2
50+
if: ${{ steps.prepare.outputs.release-exists == 'false' }}
51+
with:
52+
name: ${{ steps.prepare.outputs.release-version }}
53+
tag_name: ${{ steps.prepare.outputs.release-version }}
54+
token: ${{ secrets.ORG_BROADCAST_TOKEN2 }}
55+
generate_release_notes: true

.github/workflows/publish-testing.yml

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
name: Publish to Testing
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
matrix-builder:
14+
runs-on: ubuntu-24.04
15+
outputs:
16+
includes: ${{ steps.builder.outputs.includes }}
17+
runners: ${{ steps.builder.outputs.runners }}
18+
steps:
19+
- name: Build Matrix
20+
id: builder
21+
uses: regolith-linux/actions/build-matrix@main
22+
with:
23+
name: "i3status-rs"
24+
ref: "${{ github.ref_name }}"
25+
arch: "amd64 arm64"
26+
stage: "testing"
27+
28+
build:
29+
runs-on: ${{ fromJSON(needs.matrix-builder.outputs.runners)[matrix.arch] }}
30+
needs: matrix-builder
31+
container: "ghcr.io/regolith-linux/ci-${{ matrix.distro }}:${{ matrix.codename }}-${{ matrix.arch }}"
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
include: ${{ fromJSON(needs.matrix-builder.outputs.includes) }}
36+
env:
37+
server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}"
38+
server-username: "${{ secrets.KAMATERA_USERNAME }}"
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v4
42+
43+
- name: Import GPG Key
44+
uses: regolith-linux/actions/import-gpg@main
45+
with:
46+
gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}"
47+
48+
- name: Build Package
49+
id: build
50+
uses: regolith-linux/actions/build-package@main
51+
with:
52+
name: "i3status-rs"
53+
distro: "${{ matrix.distro }}"
54+
codename: "${{ matrix.codename }}"
55+
stage: "testing"
56+
suite: "testing"
57+
component: "main"
58+
arch: "${{ matrix.arch }}"
59+
60+
- name: Setup SSH
61+
uses: regolith-linux/actions/setup-ssh@main
62+
with:
63+
ssh-host: "${{ env.server-address }}"
64+
ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}"
65+
66+
- name: Upload Package
67+
uses: regolith-linux/actions/upload-files@main
68+
with:
69+
upload-to-folder: "i3status-rs"
70+
71+
- name: Upload SourceLog
72+
uses: regolith-linux/actions/upload-files@main
73+
with:
74+
upload-from: "${{ steps.build.outputs.buildlog-path }}"
75+
upload-pattern: "SOURCELOG_*.txt"
76+
upload-to-base: "/opt/archives/workspace/"
77+
upload-to-folder: "i3status-rs"
78+
79+
sources:
80+
runs-on: ubuntu-24.04
81+
needs: build
82+
container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64"
83+
if: ${{ !failure() && !cancelled() }}
84+
env:
85+
server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}"
86+
server-username: "${{ secrets.KAMATERA_USERNAME }}"
87+
steps:
88+
- name: Import GPG Key
89+
uses: regolith-linux/actions/import-gpg@main
90+
with:
91+
gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}"
92+
93+
- name: Setup SSH
94+
uses: regolith-linux/actions/setup-ssh@main
95+
with:
96+
ssh-host: "${{ env.server-address }}"
97+
ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}"
98+
99+
- name: Rebuild Sources
100+
uses: regolith-linux/actions/rebuild-sources@main
101+
with:
102+
workspace-subfolder: "i3status-rs"
103+
only-component: "testing"
104+
only-package: "i3status-rs"
105+
106+
publish:
107+
runs-on: ubuntu-24.04
108+
needs: sources
109+
container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64"
110+
if: ${{ !failure() && !cancelled() }}
111+
env:
112+
server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}"
113+
server-username: "${{ secrets.KAMATERA_USERNAME }}"
114+
steps:
115+
- name: Setup SSH
116+
uses: regolith-linux/actions/setup-ssh@main
117+
with:
118+
ssh-host: "${{ env.server-address }}"
119+
ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}"
120+
121+
- name: Publish Repo
122+
uses: regolith-linux/actions/publish-repo@main
123+
with:
124+
packages-path-subfolder: "i3status-rs"
125+
only-component: "testing"
126+
127+
manifests:
128+
runs-on: ubuntu-24.04
129+
needs: [matrix-builder, publish]
130+
container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64"
131+
if: ${{ !failure() && !cancelled() }}
132+
steps:
133+
- name: Update Manifests
134+
uses: regolith-linux/actions/update-manifest@main
135+
env:
136+
GITHUB_TOKEN: ${{ secrets.ORG_BROADCAST_TOKEN2 }}
137+
with:
138+
name: "i3status-rs"
139+
repo: "${{ github.server_url }}/${{ github.repository }}.git"
140+
ref: "${{ github.ref_name }}"
141+
sha: "${{ github.sha }}"
142+
matrix: "${{ needs.matrix-builder.outputs.includes }}"
143+
suite: "testing"
144+
component: "main"
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
name: Publish to Unstable
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- ubuntu/v0.22.0
8+
- ubuntu/v0.32.1
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
matrix-builder:
16+
runs-on: ubuntu-24.04
17+
outputs:
18+
includes: ${{ steps.builder.outputs.includes }}
19+
runners: ${{ steps.builder.outputs.runners }}
20+
steps:
21+
- name: Build Matrix
22+
id: builder
23+
uses: regolith-linux/actions/build-matrix@main
24+
with:
25+
name: "i3status-rs"
26+
ref: "${{ github.ref_name }}"
27+
arch: "amd64 arm64"
28+
stage: "unstable"
29+
30+
build:
31+
runs-on: ${{ fromJSON(needs.matrix-builder.outputs.runners)[matrix.arch] }}
32+
needs: matrix-builder
33+
container: "ghcr.io/regolith-linux/ci-${{ matrix.distro }}:${{ matrix.codename }}-${{ matrix.arch }}"
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
include: ${{ fromJSON(needs.matrix-builder.outputs.includes) }}
38+
env:
39+
server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}"
40+
server-username: "${{ secrets.KAMATERA_USERNAME }}"
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v4
44+
45+
- name: Import GPG Key
46+
uses: regolith-linux/actions/import-gpg@main
47+
with:
48+
gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}"
49+
50+
- name: Build Package
51+
id: build
52+
uses: regolith-linux/actions/build-package@main
53+
with:
54+
name: "i3status-rs"
55+
distro: "${{ matrix.distro }}"
56+
codename: "${{ matrix.codename }}"
57+
stage: "unstable"
58+
suite: "unstable"
59+
component: "main"
60+
arch: "${{ matrix.arch }}"
61+
62+
- name: Setup SSH
63+
uses: regolith-linux/actions/setup-ssh@main
64+
with:
65+
ssh-host: "${{ env.server-address }}"
66+
ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}"
67+
68+
- name: Upload Package
69+
uses: regolith-linux/actions/upload-files@main
70+
with:
71+
upload-to-folder: "i3status-rs"
72+
73+
- name: Upload SourceLog
74+
uses: regolith-linux/actions/upload-files@main
75+
with:
76+
upload-from: "${{ steps.build.outputs.buildlog-path }}"
77+
upload-pattern: "SOURCELOG_*.txt"
78+
upload-to-base: "/opt/archives/workspace/"
79+
upload-to-folder: "i3status-rs"
80+
81+
sources:
82+
runs-on: ubuntu-24.04
83+
needs: build
84+
container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64"
85+
if: ${{ !failure() && !cancelled() }}
86+
env:
87+
server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}"
88+
server-username: "${{ secrets.KAMATERA_USERNAME }}"
89+
steps:
90+
- name: Import GPG Key
91+
uses: regolith-linux/actions/import-gpg@main
92+
with:
93+
gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}"
94+
95+
- name: Setup SSH
96+
uses: regolith-linux/actions/setup-ssh@main
97+
with:
98+
ssh-host: "${{ env.server-address }}"
99+
ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}"
100+
101+
- name: Rebuild Sources
102+
uses: regolith-linux/actions/rebuild-sources@main
103+
with:
104+
workspace-subfolder: "i3status-rs"
105+
only-component: "unstable"
106+
only-package: "i3status-rs"
107+
108+
publish:
109+
runs-on: ubuntu-24.04
110+
needs: sources
111+
container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64"
112+
if: ${{ !failure() && !cancelled() }}
113+
env:
114+
server-address: "${{ secrets.KAMATERA_HOSTNAME2 }}"
115+
server-username: "${{ secrets.KAMATERA_USERNAME }}"
116+
steps:
117+
- name: Setup SSH
118+
uses: regolith-linux/actions/setup-ssh@main
119+
with:
120+
ssh-host: "${{ env.server-address }}"
121+
ssh-key: "${{ secrets.KAMATERA_SSH_KEY }}"
122+
123+
- name: Publish Repo
124+
uses: regolith-linux/actions/publish-repo@main
125+
with:
126+
packages-path-subfolder: "i3status-rs"
127+
only-component: "unstable"
128+
129+
manifests:
130+
runs-on: ubuntu-24.04
131+
needs: [matrix-builder, publish]
132+
container: "ghcr.io/regolith-linux/ci-ubuntu:noble-amd64"
133+
if: ${{ !failure() && !cancelled() }}
134+
steps:
135+
- name: Update Manifests
136+
uses: regolith-linux/actions/update-manifest@main
137+
env:
138+
GITHUB_TOKEN: ${{ secrets.ORG_BROADCAST_TOKEN2 }}
139+
with:
140+
name: "i3status-rs"
141+
repo: "${{ github.server_url }}/${{ github.repository }}.git"
142+
ref: "${{ github.ref_name }}"
143+
sha: "${{ github.sha }}"
144+
matrix: "${{ needs.matrix-builder.outputs.includes }}"
145+
suite: "unstable"
146+
component: "main"

0 commit comments

Comments
 (0)