-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc8663f
commit 5106952
Showing
1 changed file
with
113 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
name: Publish PreRelease | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
branches: | ||
- prerelease | ||
|
||
jobs: | ||
mac_build: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout latest code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: prerelease | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "zulu" | ||
java-version: 17 | ||
|
||
- name: Gradle Build Action | ||
uses: gradle/gradle-build-action@v2.7.1 | ||
|
||
- name: Execute Gradle build | ||
run: | | ||
./gradlew packageDistributionForCurrentOS | ||
- name: Upload mac os artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: macos-artifact | ||
path: build/compose/binaries/main/dmg/*.dmg | ||
|
||
windows_build: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout latest code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: prerelease | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "zulu" | ||
java-version: 17 | ||
|
||
- name: Gradle Build Action | ||
uses: gradle/gradle-build-action@v2.7.1 | ||
|
||
- name: Execute Gradle build | ||
run: ./gradlew packageDistributionForCurrentOS | ||
- name: Upload windows artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: windows-artifact | ||
path: build/compose/binaries/main/msi/*.msi | ||
|
||
ubuntu_build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout latest code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: prerelease | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "zulu" | ||
java-version: 17 | ||
|
||
- name: Gradle Build Action | ||
uses: gradle/gradle-build-action@v2.7.1 | ||
|
||
- name: Execute Gradle build | ||
run: ./gradlew packageDistributionForCurrentOS | ||
- name: Upload ubuntu artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ubuntu-artifact | ||
path: build/compose/binaries/main/deb/*.deb | ||
|
||
publisher: | ||
name: Publish artifacts to github release | ||
needs: [ mac_build, windows_build, ubuntu_build ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout latest code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Download all artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: dist | ||
|
||
- name: Auto Changelog | ||
uses: ardalanamini/auto-changelog@v4.0.0 | ||
id: changelog | ||
|
||
- name: Publish Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: >- | ||
gh release create ${{ github.ref_name }} | ||
./dist/*/* | ||
--notes "**【警告⚠️WARNING】**\n这个是开发版本,一般与prerelease分支代码保持同步,仅用于修复验证BUG、体验最新功能。\n日常使用请使用其他release版本。\n\n${{ steps.changelog.outputs.changelog }}" | ||
--title "ApkSigner ${{ github.ref_name }} Alpha" | ||
--prerelease |