forked from SchweizerischeBundesbahnen/scion-rcp
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (65 loc) · 2.3 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
name: "Release"
# Trigger manually
on:
workflow_dispatch:
inputs:
release-version:
required: true
jobs:
release-guard:
name: 'Guard release'
if: startsWith(github.ref, 'refs/heads/release/') # Ensure release branch
runs-on: ubuntu-latest
outputs:
release-version: ${{ steps.validate-release-version.outputs.release-version }}
develop-version: ${{ steps.validate-release-version.outputs.develop-version }}
steps:
- uses: actions/checkout@v3
- name: 'Validate release version'
uses: ./.github/actions/validate-release-version
id: validate-release-version
with:
release-version: ${{ github.event.inputs.release-version }}
release:
name: 'Make release'
needs: release-guard
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 'Setup JDK'
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
gpg-private-key: "${{ secrets.GPG_PRIVATE_KEY }}"
gpg-passphrase: GPG_PASSPHRASE # This is actually the default value
server-id: ossrh
server-username: SERVER_USERNAME
server-password: SERVER_PASSWORD
- name: 'Setup Lombok'
uses: ./.github/actions/setup-lombok
id: setup-lombok
with:
lombok-version: 1.18.26
- name: 'Run release script'
run: ./.github/scripts/release.sh
shell: bash
env:
GPG_PASSPHRASE: "${{ secrets.GPG_PASSPHRASE }}"
MAVEN_OPTS: "-javaagent:${{ steps.setup-lombok.outputs.lombok-jar }}"
RELEASE_VERSION: "${{ needs.release-guard.outputs.release-version }}"
DEVELOP_VERSION: "${{ needs.release-guard.outputs.develop-version }}"
STAGING_PROFILE_ID: "${{ vars.STAGING_PROFILE_ID }}"
SERVER_USERNAME: "${{ vars.SERVER_USERNAME }}"
SERVER_PASSWORD: "${{ secrets.SERVER_PASSWORD }}"
- name: 'Upload microfrontend library'
uses: actions/upload-artifact@v4
with:
name: microfrontend-library
path: ./target/checkout/ch.sbb.scion.rcp.microfrontend/target/*.jar
- name: 'Upload workbench library'
uses: actions/upload-artifact@v4
with:
name: workbench-library
path: ./target/checkout/ch.sbb.scion.rcp.workbench/target/*.jar