-
Notifications
You must be signed in to change notification settings - Fork 17
62 lines (60 loc) · 1.92 KB
/
release.yml
File metadata and controls
62 lines (60 loc) · 1.92 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
name: Release
on:
workflow_run:
workflows: ["Build and test"]
types:
- completed
workflow_dispatch:
inputs:
dry_run:
description: "Run in dry-run mode (no publish)"
required: false
default: "true"
jobs:
release:
name: Release
runs-on: ubuntu-latest
concurrency:
group: "release"
cancel-in-progress: true
permissions:
contents: write
issues: write
pull-requests: write
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'master')
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-java@v5
with:
java-version: "21"
distribution: "temurin"
cache: gradle
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: "20"
- name: Install semantic-release
shell: bash
run: |
npm i -g \
semantic-release \
@semantic-release/exec \
@semantic-release/git \
@semantic-release/changelog \
@google/semantic-release-replace-plugin
- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHUSERNAME }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHPASSWORD }}
shell: bash
run: |
if [ "${{ github.event.inputs.dry_run }}" = "true" ]; then
semantic-release --dry-run
else
semantic-release
fi