This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
Build #66
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 | |
on: | |
workflow_dispatch: | |
jobs: | |
macvdmtool: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
arch: [ amd64, arm64 ] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
repository: "AsahiLinux/macvdmtool" | |
- name: Build MacVDMTool | |
run: | | |
make | |
cc -o dfuTools_${{ matrix.arch }} main.o -framework CoreFoundation -framework IOKit -lc++ | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dfuTools_${{ matrix.arch }} | |
path: dfuTools_${{ matrix.arch }} | |
retention-days: 5 | |
build: | |
needs: macvdmtool | |
runs-on: macos-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install Dependencies | |
run: npm install | |
- name: Download Artifact (arm64) | |
uses: actions/download-artifact@v4 | |
with: | |
name: dfuTools_arm64 | |
path: electron/ | |
- name: Download Artifact (amd64) | |
uses: actions/download-artifact@v4 | |
with: | |
name: dfuTools_amd64 | |
path: electron/ | |
- name: Chmod dfuTools | |
run: | | |
chmod +x electron/dfuTools_* | |
mkdir -p electron/dfuTools/x64 electron/dfuTools/arm64 | |
mv electron/dfuTools_amd64 electron/dfuTools/x64/dfuTools | |
mv electron/dfuTools_arm64 electron/dfuTools/arm64/dfuTools | |
chmod +x electron/dfuTools/x64/dfuTools electron/dfuTools/arm64/dfuTools | |
- name: Build Release Files | |
run: npm run pack | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} | |
- name: Delete old Releases | |
uses: dev-drprasad/[email protected] | |
with: | |
repo: ${{ github.repository }} | |
keep_latest: 3 | |
delete_tag_pattern: "" | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} | |
- name: 获取版本号 | |
id: get-version | |
run: | | |
version=$(jq -r .version package.json) | |
echo "version=${version}" >> $GITHUB_OUTPUT | |
- name: Make release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
release/${{ steps.get-version.outputs.version }}/DFU-Tools_x64.dmg | |
release/${{ steps.get-version.outputs.version }}/DFU-Tools_x64.dmg.blockmap | |
release/${{ steps.get-version.outputs.version }}/DFU-Tools_arm64.dmg | |
release/${{ steps.get-version.outputs.version }}/DFU-Tools_arm64.dmg.blockmap | |
release/${{ steps.get-version.outputs.version }}/latest-mac.yml | |
body: "Update ${{ steps.get-version.outputs.version }}" | |
name: ${{ steps.get-version.outputs.version }} | |
tag_name: ${{ steps.get-version.outputs.version }} | |
draft: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} |