add the ability to open aprint files, passing the referencies on the … #35
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# GitHub recommends pinning actions to a commit SHA. | |
# To get a newer version, you will need to update the SHA. | |
# You can also reference a tag or branch, but the action may change without warning. | |
name: APrint Java CI | |
on: | |
push: | |
# Sequence of patterns matched against refs/heads | |
#branches: | |
# - master | |
# - 'releases/**' | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- v* | |
jobs: | |
build-windows-appimage: | |
name: Build AppImage on Windows | |
runs-on: windows-latest | |
steps: | |
# SETUP BUILD ENVIRONMENT | |
- id: checkout-code | |
name: Checkout code | |
uses: actions/checkout@v2 | |
- id: setup-jdk | |
name: Setup JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '17' | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 | |
with: | |
arguments: build createjpackage -x test | |
- id: rename-files | |
name: Rename files | |
run: | | |
move ./bundle/build/distributions/aprint ./bundle/build/distributions/aprint-windows | |
# SAVE INSTALLER | |
- id: upload-installer | |
name: Upload installer | |
uses: actions/upload-artifact@v2 | |
with: | |
path: ./bundle/build/distributions | |
name: windows-aprint | |
retention-days: 1 | |
build-linux-appimage: | |
name: Build AppImage on Linux | |
runs-on: ubuntu-latest | |
steps: | |
# SETUP BUILD ENVIRONMENT | |
- id: checkout-code | |
name: Checkout code | |
uses: actions/checkout@v2 | |
- id: setup-jdk | |
name: Setup JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '17' | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 | |
with: | |
arguments: build createjpackage -x test | |
- id: rename-downloaded-files | |
name: Rename downloaded files | |
run: | | |
ls -alR ./bundle/build/distributions/ | |
mv ./bundle/build/distributions/aprint ./bundle/build/distributions/aprint-linux | |
ls -alR ./bundle/build/distributions/ | |
- name: Compress action step | |
uses: a7ul/[email protected] | |
id: compress_linux_bundle | |
with: | |
command: c | |
cwd: ./bundle/build/distributions/ | |
files: | | |
./ | |
outPath: aprint-linux.tar.gz | |
# SAVE INSTALLER | |
- id: upload-installer | |
name: Upload installer | |
uses: actions/upload-artifact@v2 | |
with: | |
path: aprint-linux.tar.gz | |
name: aprint-linux.tar.gz | |
retention-days: 1 | |
build-macos-appimage: | |
name: Build AppImage on MacOsX | |
runs-on: macos-13 | |
steps: | |
# SETUP BUILD ENVIRONMENT | |
- id: checkout-code | |
name: Checkout code | |
uses: actions/checkout@v2 | |
- id: setup-jdk | |
name: Setup JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '17' | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 | |
with: | |
arguments: build createjpackage -x test | |
# compress before upload | |
- name: Compress action step | |
uses: a7ul/[email protected] | |
id: compress_macos_bundle | |
with: | |
command: c | |
cwd: ./bundle/build/distributions/ | |
files: | | |
./ | |
outPath: aprint-macos-13.tar.gz | |
# SAVE INSTALLER | |
- id: upload-installer | |
name: Upload installer | |
uses: actions/upload-artifact@v2 | |
with: | |
path: aprint-macos-13.tar.gz | |
name: aprint-macos-13.tar.gz | |
retention-days: 1 | |
create-release: | |
name: Create Release | |
runs-on: ubuntu-latest | |
needs: [build-linux-appimage, build-windows-appimage, build-macos-appimage] | |
steps: | |
# DOWNLOAD INSTALLERS | |
- id: download-linux-appimage | |
name: Download Linux appimage | |
uses: actions/download-artifact@v2 | |
with: | |
name: aprint-linux.tar.gz | |
- id: download-windows-image | |
name: Download Windows appimage | |
uses: actions/download-artifact@v2 | |
with: | |
name: windows-aprint | |
- id: download-macos-image | |
name: Download MacOs appimage | |
uses: actions/download-artifact@v2 | |
with: | |
name: aprint-macos-13.tar.gz | |
- id: display-downloaded-files | |
name: display downloaded files | |
run: | | |
ls -alR . | |
# CREATE GITHUB RELEASE AND ADD ASSETS | |
- id: create-release | |
name: Create GitHub release | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: prerelease-${{ github.ref_name }} | |
release_name: prerelease-${{ github.ref_name }} | |
draft: true | |
prerelease: true | |
- id: release-linux-appimage | |
name: Release Linux appimage | |
uses: actions/upload-release-asset@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-release.outputs.upload_url }} | |
asset_path: aprint-linux.tar.gz | |
asset_name: aprint-linux.tar.gz | |
asset_content_type: application/x-binary | |
- uses: montudor/action-zip@v1 | |
with: | |
args: zip -qq -r aprint-windows.zip aprint-windows | |
- id: release-windows-appimage | |
name: Release Windows appimage | |
uses: actions/upload-release-asset@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-release.outputs.upload_url }} | |
asset_path: aprint-windows.zip | |
asset_name: aprint-windows.zip | |
asset_content_type: application/x-binary | |
- id: release-macos-appimage | |
name: Release macos appimage | |
uses: actions/upload-release-asset@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create-release.outputs.upload_url }} | |
asset_path: aprint-macos-13.tar.gz | |
asset_name: aprint-macos-13.tar.gz | |
asset_content_type: application/x-binary | |