Skip to content

1.2-da8a2351-beta

1.2-da8a2351-beta #87

Workflow file for this run

name: App
on:
push:
branches:
- dev
release:
types: [created]
jobs:
build_app:
runs-on: ubuntu-latest
steps:
- name: πŸ“© Grab the code
uses: actions/checkout@v3
- name: πŸ—οΈ Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
cache: maven
- name: πŸ—οΈ Set deploy channel env
run: echo "DEPLOY_CHANNEL=${{ (github.event.release.prerelease && 'beta') || 'stable' }}" >> $GITHUB_ENV && echo $DEPLOY_CHANNEL # Default value is in app/pom.xml
if: startsWith(github.ref, 'refs/tags/1.2-')
- name: πŸ”¨ Compile the app
run: bash build.sh compile
- name: πŸ†™ Upload the app jar
uses: actions/upload-artifact@v4
with:
name: Caffeinated.jar
path: app/core/target/Caffeinated.jar
bundle_windows:
needs: [build_app]
if: startsWith(github.ref, 'refs/tags/1.2-')
runs-on: windows-latest
steps:
- name: πŸ“© Grab the code
uses: actions/checkout@v3
- name: πŸ“© Download the app artifact
uses: actions/download-artifact@v4
with:
name: Caffeinated.jar
path: app/core/target
- name: πŸ—οΈ Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
cache: maven
- name: πŸ“¦ Create the Windows bundle
run: bash build.sh dist-windows
- name: πŸ†™ Upload the Windows x86_64 bundle to GitHub
uses: actions/upload-artifact@v4
with:
name: Casterlabs-Caffeinated-windows-x86_64.zip
path: dist/artifacts/Casterlabs-Caffeinated-windows-x86_64.zip
bundle_macos:
needs: [build_app]
if: startsWith(github.ref, 'refs/tags/1.2-')
runs-on: ubuntu-latest
steps:
- name: πŸ“© Grab the code
uses: actions/checkout@v3
- name: πŸ“© Download the app artifact
uses: actions/download-artifact@v4
with:
name: Caffeinated.jar
path: app/core/target
- name: πŸ—οΈ Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
cache: maven
- name: πŸ“¦ Create the macOS bundles
run: bash build.sh dist-macos
- name: πŸ†™ Upload the macOS aarch64 bundle to GitHub
uses: actions/upload-artifact@v4
with:
name: Casterlabs-Caffeinated-macos-aarch64.tar.gz
path: dist/artifacts/Casterlabs-Caffeinated-macos-aarch64.tar.gz
- name: πŸ†™ Upload the macOS x86_64 bundle to GitHub
uses: actions/upload-artifact@v4
with:
name: Casterlabs-Caffeinated-macos-x86_64.tar.gz
path: dist/artifacts/Casterlabs-Caffeinated-macos-x86_64.tar.gz
bundle_gnulinux:
needs: [build_app]
if: startsWith(github.ref, 'refs/tags/1.2-')
runs-on: ubuntu-latest
steps:
- name: πŸ“© Grab the code
uses: actions/checkout@v3
- name: πŸ“© Download the app artifact
uses: actions/download-artifact@v4
with:
name: Caffeinated.jar
path: app/core/target
- name: πŸ—οΈ Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
cache: maven
- name: πŸ“¦ Create the GNU/Linux bundles
run: bash build.sh dist-linux
- name: πŸ†™ Upload the GNU/Linux aarch64 bundle to GitHub
uses: actions/upload-artifact@v4
with:
name: Casterlabs-Caffeinated-gnulinux-aarch64.tar.gz
path: dist/artifacts/Casterlabs-Caffeinated-gnulinux-aarch64.tar.gz
- name: πŸ†™ Upload the GNU/Linux arm bundle to GitHub
uses: actions/upload-artifact@v4
with:
name: Casterlabs-Caffeinated-gnulinux-arm.tar.gz
path: dist/artifacts/Casterlabs-Caffeinated-gnulinux-arm.tar.gz
- name: πŸ†™ Upload the GNU/Linux x86_64 bundle to GitHub
uses: actions/upload-artifact@v4
with:
name: Casterlabs-Caffeinated-gnulinux-x86_64.tar.gz
path: dist/artifacts/Casterlabs-Caffeinated-gnulinux-x86_64.tar.gz
dist:
needs: [bundle_windows, bundle_macos, bundle_gnulinux]
if: startsWith(github.ref, 'refs/tags/1.2-')
runs-on: ubuntu-latest
environment: "Caffeinated Deploy"
steps:
- name: πŸ“© Grab the code
uses: actions/checkout@v3
- name: πŸ—οΈ Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
cache: maven
- name: πŸ—οΈ Set deploy channel env
run: echo "DEPLOY_CHANNEL=${{ (github.event.release.prerelease && 'beta') || 'stable' }}" >> $GITHUB_ENV && echo $DEPLOY_CHANNEL # Default value is in app/pom.xml
if: startsWith(github.ref, 'refs/tags/1.2-')
- name: πŸ”¨ Compile the deploy helper.
run: cd deploy-helper && bash ./mvnw clean package
- name: πŸ“© Download the Windows x86_64 bundle
uses: actions/download-artifact@v4
with:
name: Casterlabs-Caffeinated-windows-x86_64.zip
path: ./
- name: πŸ“© Download the macOS aarch64 bundle
uses: actions/download-artifact@v4
with:
name: Casterlabs-Caffeinated-macos-aarch64.tar.gz
path: ./
- name: πŸ“© Download the macOS x86_64 bundle
uses: actions/download-artifact@v4
with:
name: Casterlabs-Caffeinated-macos-x86_64.tar.gz
path: ./
- name: πŸ“© Download the GNU/Linux aarch64 bundle
uses: actions/download-artifact@v4
with:
name: Casterlabs-Caffeinated-gnulinux-aarch64.tar.gz
path: ./
- name: πŸ“© Download the GNU/Linux arm bundle
uses: actions/download-artifact@v4
with:
name: Casterlabs-Caffeinated-gnulinux-arm.tar.gz
path: ./
- name: πŸ“© Download the GNU/Linux x86_64 bundle
uses: actions/download-artifact@v4
with:
name: Casterlabs-Caffeinated-gnulinux-x86_64.tar.gz
path: ./
- name: πŸ†™ Deploy the app.
env:
BB_BUCKET_ID: ${{ secrets.BB_BUCKET_ID }}
BB_CLIENT_ID: ${{ secrets.BB_CLIENT_ID }}
BB_CLIENT_KEY: ${{ secrets.BB_CLIENT_KEY }}
run: >-
java -jar deploy-helper/target/deploy-helper.jar
Casterlabs-Caffeinated-windows-x86_64.zip
Casterlabs-Caffeinated-macos-aarch64.tar.gz
Casterlabs-Caffeinated-macos-x86_64.tar.gz
Casterlabs-Caffeinated-gnulinux-aarch64.tar.gz
Casterlabs-Caffeinated-gnulinux-arm.tar.gz
Casterlabs-Caffeinated-gnulinux-x86_64.tar.gz