Skip to content

only run action on tag push #8

only run action on tag push

only run action on tag push #8

Workflow file for this run

name: Jar
on: push
jobs:
build:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ${{ matrix.os }}
env:
LANG: en_US.UTF-8
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
java: [17]
# os: [ubuntu-latest, macos-latest, windows-latest]
# java: [8, 11, 17, 21]
steps:
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Checkout
run: |
git clone https://github.com/$GITHUB_REPOSITORY.git repo
- name: Build
run: |
cd repo
./gradlew jar sourcesJar javadocJar
- name: Release
uses: softprops/action-gh-release@v2
with:
files: repo/lib/build/libs/*.jar