CI #235
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: [ main ] | |
push: | |
branches: [ main ] | |
tags: [ v* ] | |
jobs: | |
ci: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
cache: 'maven' | |
- name: Test | |
run: mvn --batch-mode --update-snapshots verify | |
- name: Prepare release notes | |
uses: release-drafter/release-drafter@v5 | |
with: | |
config-name: release-drafter.yml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publishReleaseNotes: | |
name: Publish release notes | |
needs: [ ci ] | |
runs-on: ubuntu-22.04 | |
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
- name: Extract version from tag name | |
run: | | |
version=${GITHUB_REF/refs\/tags\/v/} | |
echo "VERSION=$version" >> $GITHUB_ENV | |
- name: Publish release notes | |
uses: release-drafter/release-drafter@v5 | |
with: | |
config-name: release-drafter.yml | |
publish: true | |
name: "v${{ env.VERSION }}" | |
tag: "v${{ env.VERSION }}" | |
version: "v${{ env.VERSION }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |