Trigger JitPack on release #8
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: CI | |
on: push | |
permissions: | |
contents: write | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout latest code | |
uses: actions/checkout@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: zulu | |
java-version: 11 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Build | |
run: ./gradlew build --stacktrace --scan | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: jars | |
path: | | |
juliet-*/build/libs/*.jar | |
!**/*-sources.jar | |
!**/*-javadoc.jar | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: juliet-*/build/libs/*.jar | |
- name: Trigger JitPack build on release tag | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | |
VERSION="${GITHUB_REF/refs\/tags\/v/}" | |
JITPACK_URL="https://jitpack.io/com/github/${{ github.repository }}/${VERSION}/maven-metadata.xml" | |
curl -s -m 30 "${JITPACK_URL}" || true |