TokenTool 2.2.2 #6
Workflow file for this run
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
# Builds and uploads native install packages for Windows, Linux & macOS | |
# Create and Publish a GitHub Release to activate this workflow. | |
# Tag will be used for version and must follow semver x.x.x format exactly or jpackage will fail | |
# Only digits allowed and must include major.minor.patch numbers. | |
name: Publish Assets | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
name: ${{ matrix.os }} w/JDK ${{ matrix.java }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest, macOS-latest] | |
java: [ '17' ] | |
fail-fast: false | |
steps: | |
# ____ _ __ __ ___ ____ __ | |
# / __ ) __ __ (_)/ /____/ / ( _ ) / __ \ ____ _ _____ / /__ ____ _ ____ _ ___ | |
# / __ |/ / / // // // __ / / __ \/| / /_/ // __ `// ___// //_// __ `// __ `// _ \ | |
# / /_/ // /_/ // // // /_/ / / /_/ < / ____// /_/ // /__ / ,< / /_/ // /_/ // __/ | |
# /_____/ \__,_//_//_/ \__,_/ \____/\/ /_/ \__,_/ \___//_/|_| \__,_/ \__, / \___/ | |
# /____/ | |
- name: Git checkout | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java }} | |
- name: Cache Gradle | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-v2-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-v2- | |
- name: Build with Gradle | |
run: ./gradlew jpackage | |
# For debugging purposes... | |
- name: List releases | |
run: ls releases | |
# _ __ _ __ | |
# | | / /(_)____ ____/ /____ _ __ _____ | |
# | | /| / // // __ \ / __ // __ \| | /| / // ___/ | |
# | |/ |/ // // / / // /_/ // /_/ /| |/ |/ /(__ ) | |
# |__/|__//_//_/ /_/ \__,_/ \____/ |__/|__//____/ | |
# | |
- name: Rename windows release | |
if: matrix.os == 'windows-latest' | |
run: mv releases/TokenTool-*.exe releases/TokenTool-${{ github.event.release.tag_name }}.exe | |
- name: Upload Windows EXE Release Asset | |
id: upload-release-asset-exe | |
uses: actions/upload-release-asset@v1 | |
if: matrix.os == 'windows-latest' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: releases/TokenTool-${{ github.event.release.tag_name }}.exe | |
asset_name: TokenTool-${{ github.event.release.tag_name }}.exe | |
asset_content_type: application/octet-stream | |
- name: Upload Windows MSI Release Asset | |
id: upload-release-asset-msi | |
uses: actions/upload-release-asset@v1 | |
if: matrix.os == 'windows-latest' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: releases/TokenTool-${{ github.event.release.tag_name }}.msi | |
asset_name: TokenTool-${{ github.event.release.tag_name }}.msi | |
asset_content_type: application/octet-stream | |
# __ _ | |
# / / (_)____ __ __ _ __ | |
# / / / // __ \ / / / /| |/_/ | |
# / /___ / // / / // /_/ /_> < | |
# /_____//_//_/ /_/ \__,_//_/|_| | |
# | |
- name: Rename Linux release | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
mv releases/tokentool-*-1.x86_64.rpm releases/tokentool-${{ github.event.release.tag_name }}_x86_64.rpm | |
mv releases/tokentool_*-1_amd64.deb releases/tokentool_${{ github.event.release.tag_name }}_amd64.deb | |
- name: Upload Linux RPM Release Asset | |
id: upload-release-asset-rpm | |
uses: actions/upload-release-asset@v1 | |
if: matrix.os == 'ubuntu-latest' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: releases/tokentool-${{ github.event.release.tag_name }}_x86_64.rpm | |
asset_name: tokentool-${{ github.event.release.tag_name }}_x86_64.rpm | |
asset_content_type: application/octet-stream | |
- name: Upload Linux DEB Release Asset | |
id: upload-release-asset-deb | |
uses: actions/upload-release-asset@v1 | |
if: matrix.os == 'ubuntu-latest' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: releases/tokentool_${{ github.event.release.tag_name }}_amd64.deb | |
asset_name: tokentool_${{ github.event.release.tag_name }}_amd64.deb | |
asset_content_type: application/octet-stream | |
# ____ _____ | |
# ____ ___ ____ _ _____ / __ \/ ___/ | |
# / __ `__ \ / __ `// ___// / / /\__ \ | |
# / / / / / // /_/ // /__ / /_/ /___/ / | |
# /_/ /_/ /_/ \__,_/ \___/ \____//____/ | |
# | |
- name: Rename Mac release | |
if: matrix.os == 'macOS-latest' | |
run: | | |
mv releases/TokenTool-*.dmg releases/TokenTool-${{ github.event.release.tag_name }}.dmg | |
mv releases/TokenTool-*.pkg releases/TokenTool-${{ github.event.release.tag_name }}.pkg | |
- name: Upload Mac DMG Release Asset | |
id: upload-release-asset-dmg | |
uses: actions/upload-release-asset@v1 | |
if: matrix.os == 'macOS-latest' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: releases/TokenTool-${{ github.event.release.tag_name }}.dmg | |
asset_name: TokenTool-${{ github.event.release.tag_name }}.dmg | |
asset_content_type: application/octet-stream | |
- name: Upload Mac PKG Release Asset | |
id: upload-release-asset-pkg | |
uses: actions/upload-release-asset@v1 | |
if: matrix.os == 'macOS-latest' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: releases/TokenTool-${{ github.event.release.tag_name }}.pkg | |
asset_name: TokenTool-${{ github.event.release.tag_name }}.pkg | |
asset_content_type: application/octet-stream |