Release Build #3
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: Release Build | |
on: | |
release: | |
types: [created] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
- name: Set up Maven 3.9.6 | |
uses: stCarolas/setup-maven@v4 | |
with: | |
maven-version: 3.9.6 | |
- name: Install Dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: sudo apt-get install -y build-essential automake libtool | |
- name: Install Dependencies (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
choco install -y msbuild | |
- name: Install Dependencies (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew install automake autoconf libtool gcc | |
- name: Build with Maven | |
run: mvn clean package -B | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Package | |
path: target/*.jar | |
release: | |
name: Release | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: Package | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: "*.jar" |