Skip to content

Instantly share code, notes, and snippets.

@ethomson
Created December 22, 2019 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethomson/9f7e6a18b0bf250b44bd8175b88affc9 to your computer and use it in GitHub Desktop.
Save ethomson/9f7e6a18b0bf250b44bd8175b88affc9 to your computer and use it in GitHub Desktop.
name: Publish Release
on:
release:
types:
- created
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: |
export MVN_ARGS="-DbuildNumberSuffix="
mvn ${MVN_ARGS} package
echo "::set-env name=FILENAME::$(mvn ${MVN_ARGS} org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.build.finalName -q -DforceStdout)"
- name: Upload JAR
uses: jasonetco/upload-to-release@v0.1.1
with:
args: target/${{ env.FILENAME }}.jar application/java-archive
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment