Skip to content

Commit c31c6c1

Browse files
committed
add GitHub Action package release strategy
1 parent 27817ac commit c31c6c1

File tree

2 files changed

+30
-18
lines changed

2 files changed

+30
-18
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release Package
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Version (eg: v1, v2, v3)"
8+
type: string
9+
required: true
10+
11+
jobs:
12+
build-and-publish:
13+
runs-on: ubuntu-24.04
14+
timeout-minutes: 15
15+
steps:
16+
- uses: actions/checkout@v5
17+
with:
18+
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
19+
- name: Update versions in readme.md
20+
run: |
21+
sed -i "s|\(uses:.*@\)v[0-9]\+|\1${{ github.event.inputs.version }}|g" readme.md
22+
- uses: aboutbits/github-actions-base/git-setup@v2
23+
- uses: aboutbits/github-actions-base/git-commit-and-push-all@v2
24+
with:
25+
message: '${{ github.event.inputs.version }}'
26+
- uses: aboutbits/github-actions-base/git-create-or-update-tag@v2
27+
with:
28+
tag-name: '${{ github.event.inputs.version }}'

readme.md

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -150,25 +150,9 @@ To enable the Gradle configuration cache, which further improves the build perfo
150150
If you do not specify `cache-encryption-key`, Gradle will still work, but the configuration cache will not be saved.
151151
https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#saving-configuration-cache-data
152152

153-
## Versioning
153+
## Build & Publish
154154

155-
In order to have a versioning in place and working, create lightweight tags that point to the appropriate minor release versions.
156-
157-
Creating a new minor release:
158-
159-
```bash
160-
git tag v4
161-
git push --tags
162-
```
163-
164-
Replacing an already existing minor release:
165-
166-
```bash
167-
git tag -d v4
168-
git push origin :refs/tags/v4
169-
git tag v4
170-
git push --tags
171-
```
155+
To build and publish the chart, visit the GitHub Actions page of the repository and trigger the workflow "Release Package" manually.
172156

173157
## Information
174158

0 commit comments

Comments
 (0)