[maven-release-plugin] prepare release v0.8.0 #10
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: Create Release and Upload Artifacts | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Maven cleanup | |
run: mvn --batch-mode --update-snapshots verify | |
- name: Copy artifacts to staging directory | |
run: mkdir staging && rsync -ar --exclude 'original*' target/*.jar **/target/*.jar staging | |
- name: Fetch tag name | |
id: tagname | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
result-encoding: string | |
script: | | |
console.log("Ref was found to be " + context.payload.ref); | |
console.log("Tag was found to be " + context.payload.ref.replace("refs/tags/", "")); | |
return context.payload.ref.replace("refs/tags/", ""); | |
- name: Create release and upload artifacts | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.tagname.outputs.result }} | |
name: ${{ steps.tagname.outputs.result }} | |
draft: false | |
prerelease: false | |
files: ./staging/*.jar | |
fail_on_unmatched_files: true | |
# - name: Upload release asset | |
# uses: softprops/action-gh-release@v0.1.5 | |
# with: | |
# upload_url: $$ {{ steps.create_release.outputs.upload_url }} | |
# asset_path: staging/ | |
# asset_name: '**.jar' |