Skip to content

Add release automation #3

Add release automation

Add release automation #3

Workflow file for this run

name: release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /var/lib/docker
key: ${{ runner.os }}-docker-${{ hashFiles('Dockerfile') }}
restore-keys: |
${{ runner.os }}-docker-
- name: Build Project
run: mvn clean package
# Create a release
- name: Run JReleaser
run: mvn jreleaser:full-release
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Persist logs
- name: JReleaser release output
if: always()
uses: actions/upload-artifact@v4
with:
name: jreleaser-release
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties