-
Notifications
You must be signed in to change notification settings - Fork 9
77 lines (75 loc) · 2.42 KB
/
master.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
name: release
on:
push:
branches:
- 'master'
jobs:
maven-release:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Install Java and Maven
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Unsnapshot version
run: mvn -f toolchain-fitnesse-plugin versions:set -DremoveSnapshot
- name: Release Maven package
uses: samuelmeuli/action-maven-publish@v1
with:
directory: toolchain-fitnesse-plugin
server_id: staging
maven_profiles: release
gpg_private_key: ${{ secrets.gpg_private_key }}
gpg_passphrase: ${{ secrets.gpg_passphrase }}
nexus_username: ${{ secrets.MAVEN_USERNAME }}
nexus_password: ${{ secrets.MAVEN_PASSWORD }}
github-release:
needs: [ maven-release ]
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Install Java and Maven
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Unsnapshot version
run: mvn -f toolchain-fitnesse-plugin versions:set -DremoveSnapshot
- id: get-version
uses: JActions/[email protected]
- name: Create Release
id: createRelease
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get-version.outputs.version }}
release_name: "Toolchain FitNesse Fixtures ${{ steps.get-version.outputs.version }}"
body:
draft: false
prerelease: false
update-version:
needs: [maven-release, github-release]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Java and Maven
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Configure git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Praegus"
- name: Update version
run: |
mvn -B -f toolchain-fitnesse-plugin release:update-versions -DautoVersionSubmodules=true
git add pom.xml
git commit -m "Update version"
git push origin master