-
Notifications
You must be signed in to change notification settings - Fork 118
67 lines (58 loc) · 1.83 KB
/
tag-new-release.yml
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
name: Release a new Central Dogma version
on:
workflow_dispatch:
inputs:
release_version:
description: 'Release Version'
required: true
type: string
next_version:
description: 'Next Version'
required: true
type: string
env:
LC_ALL: "en_US.UTF-8"
jobs:
tag-new-version:
if: github.repository == 'line/centraldogma'
runs-on: ubuntu-latest
steps:
- name: Validate inputs
run: |
if [[ ! "${{ inputs.release_version }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: 'release_version' should be in SemVer format."
exit 1
fi
if [[ ! "${{ inputs.next_version }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: 'next_version' should be in SemVer format."
exit 1
fi
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Set up Git remote
run: |
git remote set-url origin https://github.com/line/centraldogma.git
shell: bash
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSWORD }}
git_user_signingkey: true
git_commit_gpgsign: true
- id: setup-jdk-21
name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
- name: Set up Gradle
uses: gradle/gradle-build-action@v2
- name: Bump up version
run: |
./gradlew --no-daemon --stacktrace --max-workers=1 release \
-PreleaseVersion=${{ inputs.release_version }} \
-PnextVersion=${{ inputs.next_version }}
shell: bash