Skip to content

Fix error of being unable to parse when the profile class is unknown #19

Fix error of being unable to parse when the profile class is unknown

Fix error of being unable to parse when the profile class is unknown #19

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches: [ main ]
tags: [ v* ]
pull_request:
branches: [ main ]
jobs:
build-with-zulu:
name: ${{ matrix.os }}(${{ matrix.type }}) ${{ matrix.arch }} with Auzl Zulu
runs-on: ${{ matrix.label }}
strategy:
fail-fast: false
matrix:
include:
- { label: windows-latest, os: Windows, arch: x86_64, type: msi }
- { label: windows-latest, os: Windows, arch: x86_64, type: app-image }
- { label: macos-13, os: macOS, arch: x86_64, type: dmg }
- { label: macos-13, os: macOS, arch: x86_64, type: pkg }
- { label: macos-13, os: macOS, arch: x86_64, type: app-image }
- { label: macos-latest, os: macOS, arch: aarch64, type: dmg }
- { label: macos-latest, os: macOS, arch: aarch64, type: pkg }
- { label: macos-latest, os: macOS, arch: aarch64, type: app-image }
steps:
- name: Checkout MiniLPA
uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build Native Executable
shell: pwsh
run: |
./scripts/Build.ps1 -NativeExecutable -NativeExecutableType ${{ matrix.type }}
- name: Get Short Commit Id
shell: pwsh
run: |
"SHORT_COMMIT_ID=$($Env:GITHUB_SHA.Substring(0, 7))" | Out-File -FilePath $Env:GITHUB_ENV -Append
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: MiniLPA-${{ env.SHORT_COMMIT_ID }}-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.type }}
path: |
build/dist/
build-with-jbr:
name: ${{ matrix.os }}(${{ matrix.type }}) ${{ matrix.arch }} ${{ matrix.wayland && 'Wayland' || '' }} with JetBrains Runtime
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
type: [ deb, rpm, app-image ]
wayland: [ true, false ]
include:
- os: Linux
- arch: x86_64
steps:
- name: Checkout MiniLPA
uses: actions/checkout@v4
- name: Checkout JetBrains Setup
uses: actions/checkout@v4
with:
repository: ShiinaSekiu/github-actions-jbr-setup
ref: jdk
path: .github/shared_actions/jbr
- name: Install JetBrains Runtime
uses: ./.github/shared_actions/jbr/setup_jbr21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build Native Executable
shell: pwsh
run: |
./scripts/Build.ps1 -NativeExecutable -NativeExecutableType ${{ matrix.type }} -NativeWayland:$${{ matrix.wayland }} -GithubToken ${{ secrets.GITHUB_TOKEN }}
- name: Get Short Commit Id
shell: pwsh
run: |
"SHORT_COMMIT_ID=$($Env:GITHUB_SHA.Substring(0, 7))" | Out-File -FilePath $Env:GITHUB_ENV -Append
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: MiniLPA-${{ env.SHORT_COMMIT_ID }}-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.type }}${{ matrix.wayland && '-Wayland' || '' }}
path: |
build/dist/
canary-telegram:
name: Canary(Telegram)
runs-on: macos-latest
needs: [ build-with-zulu, build-with-jbr ]
if: "!startsWith(github.ref, 'refs/tags/v')"
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
steps:
- name: Checkout Scripts
uses: actions/checkout@v4
if: env.TELEGRAM_TOKEN != ''
with:
sparse-checkout: scripts
- name: Setup Python
uses: actions/setup-python@v5
if: env.TELEGRAM_TOKEN != ''
with:
python-version: 'pypy3.10'
cache: 'pip'
- name: Download Artifact
uses: actions/download-artifact@v4
if: env.TELEGRAM_TOKEN != ''
with:
merge-multiple: true
path: artifact
- name: Telegram Push
shell: pwsh
if: env.TELEGRAM_TOKEN != ''
run: |
pip install -r scripts/requirements.txt
python scripts/telegrampush.py -token '${{ secrets.TELEGRAM_TOKEN }}' -target '@MiniLPACanary' -path "$(Get-Location)/artifact/" -message "\[[$($Env:GITHUB_SHA.Substring(0, 7))](${{ github.event.head_commit.url }})\] ${{ github.event.head_commit.message }}”
release-telegram:
name: Release(Telegram)
runs-on: macos-latest
needs: [ build-with-zulu, build-with-jbr ]
if: startsWith(github.ref, 'refs/tags/v')
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
steps:
- name: Checkout Scripts
uses: actions/checkout@v4
if: env.TELEGRAM_TOKEN != ''
with:
sparse-checkout: scripts
- name: Setup Python
uses: actions/setup-python@v5
if: env.TELEGRAM_TOKEN != ''
with:
python-version: 'pypy3.10'
cache: 'pip'
- name: Download Artifact
uses: actions/download-artifact@v4
if: env.TELEGRAM_TOKEN != ''
with:
merge-multiple: true
path: artifact
- name: Telegram Push
shell: pwsh
if: env.TELEGRAM_TOKEN != ''
run: |
pip install -r scripts/requirements.txt
python scripts/telegrampush.py -token '${{ secrets.TELEGRAM_TOKEN }}' -target '@MiniLPA' -path "$(Get-Location)/artifact/" -message "🎉 $("${{ github.ref_name }}".Replace(".", "\.")) Released\! 🎉`n[GitHub Release](https://github.com/EsimMoe/MiniLPA/releases/tag/$("${{ github.ref_name }}".Replace(".", "\.")))”
release-github:
name: Release(GitHub)
runs-on: macos-latest
needs: [ build-with-zulu, build-with-jbr ]
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Get Artifact SHA256
id: artifact-hash
shell: pwsh
run: |
'sha256<<EOF' | Out-File -Path $Env:GITHUB_OUTPUT -Append
Get-ChildItem | ForEach-Object { (Get-FileHash $_.FullName -Algorithm SHA256).Hash + ' ' + $_.Name | Out-File -Path $Env:GITHUB_OUTPUT -Append }
'EOF' | Out-File -Path $Env:GITHUB_OUTPUT -Append
- name: GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
append_body: true
body: |
## Artifacts SHA256 Hashes
```
${{ steps.artifact-hash.outputs.sha256 }}
```
files: '*'