-
Notifications
You must be signed in to change notification settings - Fork 32
80 lines (69 loc) · 2.68 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Release
on:
workflow_dispatch:
inputs:
branch:
description: "The Infinispan Console branch to checkout when cutting the release."
required: true
default: "main"
version:
description: "Release version"
required: true
nextVersion:
description: "Next version"
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch }}
- name: Set release version
run: |
mvn -B versions:set -DnewVersion=${{ github.event.inputs.version }} -DprocessAllModules=true
mvn -B versions:set-property -Dproperty=version.infinispan -DnewVersion=${{ github.event.inputs.version }}
- name: Set up Java for publishing to OSSRH
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.INFINISPAN_MAVEN_GPG_ARMORED }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish to OSSRH
run: mvn -B clean deploy -Pcommunity-release -DskipTests -Dinfinispan-console.brand.version=${{ github.event.inputs.version }}
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.INFINISPAN_MAVEN_GPG_PASSPHRASE }}
- name: Configure Git User
run: |
git config user.email "[email protected]"
git config user.name "Infinispan"
- name: Tag Release
run: |
git commit -a -m "Releasing ${{ github.event.inputs.version }}"
git tag ${{ github.event.inputs.version }}
- name: Next Version
run: |
mvn -B versions:set -DnewVersion=${{ github.event.inputs.nextVersion }} -DprocessAllModules=true
mvn -B versions:set-property -Dproperty=version.infinispan -DnewVersion=${{ github.event.inputs.nextVersion }}
git commit -a -m "Next version ${{ github.event.inputs.nextVersion }}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.event.inputs.branch }}
tags: true
- id: release
name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}