forked from apache/cassandra-java-driver
-
Notifications
You must be signed in to change notification settings - Fork 38
64 lines (52 loc) · 1.65 KB
/
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
name: Release ScyllaDB Java Driver
on:
workflow_dispatch:
inputs:
dryrun:
type: boolean
description: 'dryrun: run without pushing SCM changes to upstream'
default: true
jobs:
release:
name: Release
runs-on: ubuntu-22.04
permissions:
contents: write
env:
MVNCMD: mvn -B -X -ntp
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
server-id: ossrh
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
- name: Configure Git user
run: |
git config user.name "ScyllaDB Promoter"
git config user.email "[email protected]"
- name: Clean project
run: $MVNCMD clean
- name: Clean release
run: $MVNCMD release:clean
- name: Prepare release
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: $MVNCMD release:prepare -DpushChanges=false -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
- name: Perform release
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
if: ${{ github.event.inputs.dryrun == 'false' }}
run: $MVNCMD release:perform -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
- name: Push changes to SCM
if: ${{ github.event.inputs.dryrun == 'false' }}
run: |
git status && git log -3
git push origin --follow-tags -v