Skip to content

Commit

Permalink
Create release script to publish jar on tag push
Browse files Browse the repository at this point in the history
This commit adds a new github workflow to the project which is
responsible for building and publishing the final serena jar to the
github releases when a commit has been tagged.
  • Loading branch information
lynxplay committed Oct 1, 2019
1 parent f2b67a7 commit e77158c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: release-project

on: push

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
if: startsWith(github.ref, 'refs/tags/')

- name: Set up JDK 1.12
uses: actions/setup-java@v1
if: startsWith(github.ref, 'refs/tags/')
with:
java-version: 1.12


- name: Build with Maven
run: mvn -B package --file pom.xml -Djar.finalName=serena
if: startsWith(github.ref, 'refs/tags/')

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: target/serena.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e77158c

Please sign in to comment.