-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (75 loc) · 2.5 KB
/
release-and-publish-ci.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: Create and deploy Maven Release
on:
workflow_dispatch:
inputs:
release-version:
description: 'Release version'
required: true
default: '0.0.0'
devel-version:
description: 'Development version'
required: true
default: '0.0.0-SNAPSHOT'
release-branch:
description: 'Release branch'
required: true
default: 'master'
devel-branch:
description: 'Development branch'
required: true
default: 'jboss-repo'
jobs:
release-and-publish:
runs-on: ubuntu-latest
name: "Release and publish Maven artifact"
steps:
- id: checkout
name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 0
- id: setup-jdk
name: "Set up JDK 11"
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'
- id: perform
name: "Perform Release"
uses: mcarlett/[email protected]
with:
release-version: ${{ github.event.inputs.release-version }}
devel-version: ${{ github.event.inputs.devel-version }}
devel-branch: ${{ github.event.inputs.devel-branch }}
release-branch: ${{ github.event.inputs.release-branch }}
- id: install-package
name: "Install package"
run: mvn clean install -U -B -DskipTests=true
- id: maven-verify
name: "Maven Verify"
run: mvn -B verify
- id: custom-settings
name: "Create custom Maven settings"
uses: whelk-io/maven-settings-xml-action@v14
with:
servers: '[{"id":"jboss-releases-repository","username":"${env.JBOSS_USERNAME}","password":"${env.JBOSS_PASSWORD}"},{"id":"jboss-snapshots-repository","username":"${env.JBOSS_USERNAME}","password":"${env.JBOSS_PASSWORD}"}]'
- id: maven-deploy
name: "Maven Deploy"
run: mvn deploy -DskipTests
env:
JBOSS_USERNAME: ${{ secrets.JBOSS_USERNAME }}
JBOSS_PASSWORD: ${{ secrets.JBOSS_PASSWORD }}
- id: create-release
name: "Create GitHub Release"
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: refs/tags/${{ steps.perform.outputs.generated-tag }}
release_name: Release ${{ steps.perform.outputs.generated-tag }}
draft: false
prerelease: false
- id: show-tag
name: "Show generated tag"
run: "echo generated release: ${{ steps.perform.outputs.generated-tag }}"
shell: bash