Skip to content

Release

Release #85

Workflow file for this run

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