-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (72 loc) · 2.42 KB
/
createRelease.yml
File metadata and controls
86 lines (72 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Create Release
# This workflow is triggered when tagging with v*
# example:
# git tag v0.0.22-beta
# git push origin v0.0.22-beta
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"
cache: "maven"
server-id: central
server-username: ${{ secrets.OSSRH_USERNAME }}
server-password: ${{ secrets.OSSRH_PASSWORD }}
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: setup python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: 'pip' # caching pip dependencies
- name: Install python requirements
run: pip install -r .github/scripts/requirements.txt
- name: Setup maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.6.3
- name: configure-git-user
run: |
git config user.email "actions@github.com"
git config user.name "GitHub Actions"
- name: get-pom-version
id: pom-version
run: |
echo "JAVA_POM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> "$GITHUB_OUTPUT"
- name: print-pom-version
run: echo "JAVA_POM_VERSION=${{ steps.pom-version.outputs.JAVA_POM_VERSION }}"
- name: Maven deploy
id: deploy_github
run: |
mvn deploy \
--batch-mode \
--settings .github/settings.xml \
-DskipTests \
-P gpg-signing,cimodules,dev,release,sonatypeDeploy
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: Create Release
# https://github.com/ncipollo/release-action/blob/main/.github/workflows/release.yml
id: create_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: false
generateReleaseNotes: true
body: ""