Skip to content

Commit

Permalink
Create publish_jar.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorOSS authored Feb 14, 2024
1 parent 99c104c commit ea4c2ab
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/publish_jar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release on Tag

on:
push:
branches: [master]
tags:
- 'release-*'

jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'

- name: Build with Maven
run: mvn clean package

- name: Extract Release Info
id: release_info
run: |
echo "Reading release_info.info..."
VERSION=$(awk -F= '/^VERSION=/ {print $2}' release_info.info)
DESCRIPTION=$(awk '/^DESCRIPTION=/,EOF' release_info.info | sed '1 s/DESCRIPTION=//' | sed ':a;N;$!ba;s/\n/%0A/g')
echo "::set-output name=version::${VERSION}"
echo "::set-output name=description::${DESCRIPTION}"
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.release_info.outputs.version }}
name: Release ${{ steps.release_info.outputs.version }}
body: ${{ steps.release_info.outputs.description }}
files: target/*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ea4c2ab

Please sign in to comment.