Skip to content

Version 0.3.0

Version 0.3.0 #3

name: Attach binary to release
on:
release:
types: [created]
jobs:
tag_and_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 18
uses: actions/setup-java@v3
with:
java-version: '18'
distribution: 'adopt'
cache: maven
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn package
- name: Extract Version from POM
id: extract_version
run: echo ::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./target/macatalauncher-${{ steps.extract_version.outputs.version }}.jar
asset_name: macatalauncher-${{ steps.extract_version.outputs.version }}.jar
asset_content_type: application/java-archive