Skip to content

fix docs action

fix docs action #324

Workflow file for this run

name: build
on:
push:
workflow_dispatch:
create:
tag: '*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
release_id: ${{ steps.release.outputs.id }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 19
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 20
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Clean up artifacts
run: rm target/original-*.jar
- name: Release
id: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: "ServerTap ${{ github.ref_name }}"
body_path: CHANGELOG.md
draft: true
files: target/*.jar
# use a separate step to un-draft the release in case the build fails
finalize-release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Publish release
if: startsWith(github.ref, 'refs/tags/')
uses: eregon/publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.build.outputs.release_id }}