Skip to content

Commit 61619d2

Browse files
committed
streamline CI
1 parent 4569d93 commit 61619d2

2 files changed

Lines changed: 29 additions & 31 deletions

File tree

.github/workflows/publish.yml

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,43 @@
1-
name: Publish package to GitHub Packages
1+
name: Release Package
2+
23
on:
34
workflow_dispatch:
45
inputs:
56
version:
6-
description: "Version name to publish (eg: x.x.x)"
7+
description: "Version (eg: x.x.x)"
78
type: string
89
required: true
910

1011
jobs:
11-
publish:
12-
timeout-minutes: 15
12+
build-and-publish:
1313
runs-on: ubuntu-24.04
14+
timeout-minutes: 15
1415
permissions:
1516
contents: read
1617
packages: write
17-
1818
steps:
19-
- uses: actions/checkout@v4
20-
21-
- uses: aboutbits/github-actions-java/setup@v3
22-
23-
- name: Set Version
24-
run: sed -i 's|<version>BUILD-SNAPSHOT</version>|<version>${{ github.event.inputs.version }}</version>|g' pom.xml
25-
19+
- uses: actions/checkout@v5
20+
with:
21+
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
22+
- uses: aboutbits/github-actions-base/git-setup@v2
23+
- uses: aboutbits/github-actions-java/setup-with-maven@v4
24+
with:
25+
java-version: 21
26+
- uses: aboutbits/github-actions-java/set-version-with-maven@v4
27+
with:
28+
version: "${{ github.event.inputs.version }}"
2629
- name: Publish package
27-
run: mvn -s $GITHUB_WORKSPACE/.github/workflows/maven-settings.xml --batch-mode deploy
2830
env:
2931
GITHUB_USER_NAME: ${{ github.actor }}
3032
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31-
32-
release:
33-
timeout-minutes: 5
34-
runs-on: ubuntu-24.04
35-
needs: publish
36-
steps:
37-
- uses: actions/checkout@v4
38-
39-
- name: Create GitHub release
40-
uses: actions/github-script@v7
33+
run: mvn -s $GITHUB_WORKSPACE/.github/workflows/maven-settings.xml --batch-mode deploy
34+
shell: bash
35+
- uses: aboutbits/github-actions-base/git-commit-and-push-all@v2
36+
with:
37+
message: '${{ github.event.inputs.version }}'
38+
- uses: aboutbits/github-actions-base/git-create-or-update-tag@v2
39+
with:
40+
tag-name: 'v${{ github.event.inputs.version }}'
41+
- uses: aboutbits/github-actions-base/github-create-release@v2
4142
with:
42-
script: |
43-
github.rest.repos.createRelease({
44-
owner: context.repo.owner,
45-
repo: context.repo.repo,
46-
tag_name: '${{ github.event.inputs.version }}',
47-
name: 'Release ${{ github.event.inputs.version }}',
48-
prerelease: '${{ github.event.inputs.version }}'.includes('RC')
49-
})
43+
tag-name: 'v${{ github.event.inputs.version }}'

readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ In your IDE go to `Settings` then search for "checkstyle".
4848
Add a new checkstyle configuration and select the `target/checkstyle-checker.xml` file.
4949
Set the property `org.checkstyle.sun.suppressionfilter.config` to `checkstyle-suppressions.xml`
5050

51+
## Build & Publish
52+
53+
To build and publish the chart, visit the GitHub Actions page of the repository and trigger the workflow "Release Package" manually.
54+
5155
## Information
5256

5357
About Bits is a company based in South Tyrol, Italy. You can find more information about us on [our website](https://aboutbits.it).

0 commit comments

Comments
 (0)