Skip to content

Commit cf47367

Browse files
committed
feat: enable github action to prepare release
1 parent 9ed2263 commit cf47367

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/prepare-release.yml

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

0 commit comments

Comments
 (0)