Repository navigation
116 lines (110 loc) · 4.27 KB
/
Copy pathrelease.yml
File metadata and controls
116 lines (110 loc) · 4.27 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Release HAL
on:
push:
tags:
- 'v*'
jobs:
deploy:
name: Deploy Maven Artifacts
runs-on: ubuntu-latest
env:
MVN: ./mvnw --show-version --batch-mode --no-transfer-progress
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6.0.1
with:
java-version: 11
distribution: temurin
cache: maven
- run: $MVN package -P prod,theme-wildfly
- uses: actions/setup-java@v6.0.1
with: # running setup-java again overwrites the settings.xml
java-version: 11
distribution: temurin
server-id: central
server-username: CENTRAL_USERNAME
server-password: CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- run: $MVN deploy -P prod,release,theme-wildfly
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
standalone:
name: Build Standalone Console
needs: deploy
runs-on: ubuntu-latest
env:
MVN: ./mvnw --show-version --batch-mode --no-transfer-progress
steps:
- id: get-version
uses: battila7/get-version-action@v2.3.0
- uses: actions/checkout@v7
- uses: actions/setup-java@v6.0.1
with:
java-version: 11
distribution: temurin
cache: maven
- uses: docker/login-action@v4.6.0
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
- id: standalone-tag
run: $MVN package --projects standalone --also-make -P native,prod,theme-hal -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.image=quay.io/halconsole/hal:${{ steps.get-version.outputs.version-without-v }}.Final '-Dquarkus.container-image.labels."org.opencontainers.image.revision"='$GITHUB_SHA -Dquarkus.native.remote-container-build=true
- id: check-latest
run: |
LATEST_TAG=$( git tag | sort -V | tail -1 )
if [ "$LATEST_TAG" = "${{ steps.get-version.outputs.version }}" ]; then
echo "::set-output name=latest::true"
else
echo "::set-output name=latest::false"
fi
- id: standalone-latest
if: steps.check-latest.outputs.latest == 'true'
run: $MVN -DskipTests package --projects standalone --also-make -P native,prod,theme-hal -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.container-image.image=quay.io/halconsole/hal:latest '-Dquarkus.container-image.labels."org.opencontainers.image.revision"='$GITHUB_SHA -Dquarkus.native.remote-container-build=true
publish:
name: Publish to GitHub Pages
needs: deploy
runs-on: ubuntu-latest
env:
MVN: ./mvnw --show-version --batch-mode --no-transfer-progress
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6.0.1
with:
java-version: 11
distribution: temurin
cache: maven
- run: $MVN package -P prod,theme-hal
- uses: JamesIves/github-pages-deploy-action@v4.9.0
with:
branch: gh-pages
folder: ./app/target/gh-pages
clean: true
release:
name: Create GitHub Release
needs: deploy
runs-on: ubuntu-latest
steps:
- id: get-version
uses: battila7/get-version-action@v2.3.0
- uses: actions/checkout@v7
- id: read-changelog
uses: mindsers/changelog-reader-action@v2
with:
path: ./CHANGELOG.md
version: ${{ steps.get-version.outputs.version-without-v }}
- uses: actions/create-release@v1
env:
# Don't use ${{ secrets.GITHUB_TOKEN }}
# This doesn't trigger the release event
# that is necessary for the native.yml workflow
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
tag_name: ${{ steps.get-version.outputs.version }}
release_name: HAL ${{ steps.get-version.outputs.version-without-v }}.Final
body: ${{ steps.read-changelog.outputs.changes }}
draft: false
prerelease: false