Build Release Binaries #28
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
name: Build Release Binaries | |
on: | |
workflow_dispatch: | |
jobs: | |
# # Windows Package | |
# create-win-package: | |
# runs-on: windows-latest | |
# permissions: | |
# contents: write | |
# name: Create Windows Package | |
# steps: | |
# # Setup Java environment for the next steps | |
# - name: Setup Java | |
# uses: actions/setup-java@v2 | |
# with: | |
# distribution: 'zulu' | |
# java-version: 21 | |
# # Check out current repository | |
# - name: Fetch Sources | |
# uses: actions/checkout@v4 | |
# # 设置工作目录 | |
# - name: Set working directory | |
# run: | | |
# echo '${{ github.workspace }}' | |
# # Build Desktop Packaged application | |
# - name: Desktop App Package | |
# run: | | |
# cd "${{ github.workspace }}" | |
# ./gradlew packageMsi | |
# # Create a Draft Release | |
# - name: Draft Release | |
# uses: ncipollo/release-action@v1 | |
# with: | |
# draft: true | |
# allowUpdates: true | |
# generateReleaseNotes: true #自动生成发行说明。 | |
# tag: "${{ github.ref_name }}" | |
# artifacts: "${{ github.workspace }}/build/compose/binaries/main/msi/*.msi" | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
create-mac-package: | |
runs-on: macos-13 | |
permissions: | |
contents: write | |
name: Create Mac Package | |
steps: | |
# Setup Java environment for the next steps | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
# Check out current repository | |
- name: Fetch Sources | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch all history | |
tags: true # Fetch all tags | |
# Install p7zip tool | |
- name: Install p7zip | |
run: brew install p7zip | |
# Unzip the 7z file | |
- name: Unzip 7z file | |
run: 7z x ./resources/common/dictionary/ecdict.7z -o./resources/common/dictionary/ | |
# Delete the original 7z file | |
- name: Delete 7z file | |
run: rm ./resources/common/dictionary/ecdict.7z | |
# Add execute permissions to gradlew | |
- name: Set execute permissions on gradlew | |
run: chmod +x ./gradlew | |
# Build Desktop Packaged application | |
- name: Desktop App Package | |
run: ./gradlew packageDmg | |
# Get the latest tag | |
- name: Get latest tag | |
id: latesttag | |
run: | | |
TAG=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "1.0.0") | |
echo "TAG=$TAG" >> $GITHUB_ENV | |
# Create a Draft Release | |
- name: Draft Release | |
uses: ncipollo/release-action@v1 | |
with: | |
draft: true | |
allowUpdates: true | |
generateReleaseNotes: false #自动生成发行说明。 | |
tag: "${{ env.TAG }}" | |
artifacts: "${{ github.workspace }}/build/compose/binaries/main/dmg/*.dmg" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# create-linux-package: | |
# runs-on: ubuntu-latest | |
# permissions: | |
# contents: write | |
# name: Create Deb Package | |
# steps: | |
# # Setup Java environment for the next steps | |
# - name: Setup Java | |
# uses: actions/setup-java@v2 | |
# with: | |
# distribution: 'zulu' | |
# java-version: 21 | |
# | |
# # Check out current repository | |
# - name: Fetch Sources | |
# uses: actions/checkout@v4 | |
# | |
# # Add execute permissions to gradlew | |
# - name: Set execute permissions on gradlew | |
# run: chmod +x ./gradlew | |
# | |
# # 设置工作目录 | |
# - name: Set working directory | |
# run: | | |
# cd ${{ github.workspace }} | |
# | |
# # Build Desktop Packaged application | |
# - name: Desktop App Package | |
# run: ./gradlew packageDeb | |
# | |
# # Create a Draft Release | |
# - name: Draft Release | |
# uses: ncipollo/release-action@v1 | |
# with: | |
# draft: true | |
# allowUpdates: true | |
# generateReleaseNotes: false #自动生成发行说明。 | |
# tag: "${{ github.ref_name }}" | |
# artifacts: "${{ github.workspace }}/build/compose/binaries/main/deb/*.deb" | |
# token: ${{ secrets.GITHUB_TOKEN }} | |