Skip to content

Release

Release #9

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
jobs:
precheck:
name: Precheck
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.vars.outputs.VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Version
id: vars
shell: bash
run: |
VERSION=${{ github.event.inputs.version }}
./mvnw -B versions:set versions:commit -DnewVersion=$VERSION
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Action"
git commit -a -m "Releasing version $VERSION"
git push origin main
assemble:
needs: [ precheck ]
uses: jagodevreede/sdkman-ui/.github/workflows/reusable-assemble.yml@main
with:
project-version: ${{ needs.precheck.outputs.VERSION }}
release:
needs: [ precheck, assemble ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: artifacts-*
merge-multiple: true
path: sdkman-ui/target/
- name: Release
uses: jreleaser/release-action@v2
with:
arguments: full-release
env:
JRELEASER_PROJECT_VERSION: ${{ github.event.inputs.VERSION }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: JReleaser output
if: always()
uses: actions/upload-artifact@v4
with:
retention-days: 1
name: jreleaser-release
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
- name: Set next snapshot version
id: vars
shell: bash
run: |
./mvnw -B versions:set versions:commit -DnextSnapshot=true
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Action"
git commit -a -m "Preparing for next snapshot version"
git push origin main