Skip to content

Build Release Binaries #30

Build Release Binaries

Build Release Binaries #30

Workflow file for this run

name: Build Release Binaries
on:
workflow_dispatch:
jobs:
create-mac-package:
name: Create Mac Package
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-13, macos-latest ]
permissions:
contents: write
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 }}