✨ 添加 mac x86-64 打包 github action #1
Workflow file for this run
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: Mac x86-64 package | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout dweb_browsers_release | |
uses: actions/checkout@v4 | |
- name: Checkout dweb_browsers | |
uses: actions/checkout@v4 | |
with: | |
repository: BioforestChain/dweb_browser | |
path: dweb_browser | |
token: ${{ secrets.MAC_X86_PACKAGE }} | |
- name: Setup Xcode 15.4 | |
run: sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer | |
shell: bash | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'corretto' | |
java-version: 21 | |
- name: Set up Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: Set up PNPM | |
uses: pnpm/action-setup@v4 | |
- name: Dependencis install | |
run: | | |
cd dweb_browser && deno task init && nohup deno task dev & | |
- name: Delay for 5 minutes | |
run: sleep 300 | |
shell: bash | |
- name: Run dweb_browser script | |
run: | | |
cd dweb_browser/next/kmp | |
./gradlew :desktopApp:createReleaseDistributable -PreleaseBuild=true | |
- name: Compress files | |
run: | | |
cd dweb_browser/next/kmp/app/desktopApp/build/compose/binaries/main-release/ | |
zip -r ../DwebBrowser-mac-x86-64.zip . | |
shell: bash | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body: | | |
This is the release for the tag ${{ github.ref }}. | |
draft: false | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.MAC_X86_PACKAGE }} | |
- name: Upload artifact | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dweb_browser/next/kmp/app/desktopApp/build/compose/binaries/main-release/ | |
asset_name: DwebBrowser-mac-x86-64.zip | |
asset_content_type: application/zip | |