Skip to content

Commit b23dd25

Browse files
committed
👷: Adjust deployment workflows
1 parent ff88529 commit b23dd25

3 files changed

Lines changed: 50 additions & 6 deletions

File tree

.github/workflows/publish-docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Publish Documentation to GitHub Pages
33
on:
44
release:
55
types: [ published ]
6-
workflow_dispatch:
76

87
permissions:
98
contents: read

.github/workflows/publish-package.yml

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Publish package to Maven Central
22

33
on:
4-
release:
5-
types: [ published ]
6-
workflow_dispatch:
4+
push:
5+
tags:
6+
- 'v*'
77

88
permissions:
99
contents: read
@@ -13,7 +13,30 @@ concurrency:
1313
cancel-in-progress: false
1414

1515
jobs:
16-
deploy:
16+
determine-release-type:
17+
name: Determine Release Type
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
22+
outputs:
23+
is-pre-release: ${{ steps.determine.outputs.is-pre-release }}
24+
tag-name: ${{ github.ref_name }}
25+
26+
steps:
27+
- name: Determine Release Type
28+
id: determine
29+
run: |
30+
TAG=${GITHUB_REF#refs/tags/}
31+
if [[ "$TAG" == *"-"* ]]; then
32+
echo "This is a pre-release version."
33+
echo "is-pre-release=true" >> $GITHUB_OUTPUT
34+
else
35+
echo "This is a stable release version."
36+
echo "is-pre-release=false" >> $GITHUB_OUTPUT
37+
fi
38+
39+
publish-artifacts:
1740
runs-on: ubuntu-latest
1841

1942
steps:
@@ -26,10 +49,28 @@ jobs:
2649
- name: Build project
2750
run: ./gradlew clean build
2851

29-
- name: Publish package to Maven Central
52+
- name: Publish artifacts to Maven Central
3053
run: ./gradlew publish
3154
env:
3255
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
3356
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
3457
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
3558
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
59+
60+
release:
61+
name: Publish Release Notes
62+
runs-on: ubuntu-latest
63+
needs: [ determine-release-type, publish-artifacts ]
64+
permissions:
65+
contents: write
66+
67+
steps:
68+
- name: Create GitHub Release
69+
uses: softprops/action-gh-release@v2
70+
with:
71+
tag_name: ${{ needs.determine-release-type.outputs.tag-name }}
72+
name: ${{ needs.determine-release-type.outputs.tag-name }}
73+
draft: false
74+
prerelease: ${{ needs.determine-release-type.outputs.is-pre-release }}
75+
body: |
76+
**${{ needs.determine-release-type.outputs.tag-name }}**

.gitwit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ types:
2222
🔥: "Removing code or files"
2323
🔒: "Security-related changes"
2424
🌐: "Internationalization or localization"
25+
🔖: "Release-related changes (e.g. version bumps, changelog updates)"
2526

2627
scope:
2728
description: "Specify the scope of the change (e.g. component or module)"
@@ -49,9 +50,12 @@ changelog:
4950
🔒: "Security fixes"
5051
showOtherTypes: true
5152
showBreakingChanges: true
53+
ignored:
5254
ignored:
5355
- 🧹
5456
- 👷
57+
- 🔖
58+
- Merge
5559
format:
5660
sectionTemplate: "{scope}: {description} ({shortHash})"
5761
breakingChangesTemplate: "{type} ({scope})!: {description} ({shortHash})"

0 commit comments

Comments
 (0)