123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- name: 打包
- on:
- workflow_dispatch:
- jobs:
- build-windows:
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-node@v4
- with:
- node-version: 18
- - run: echo (node -p -e '`VERSION=${require("./package.json").version}`') >> $Env:GITHUB_ENV
- - run: npm install
- - run: npm run package
- - uses: maotoumao/inno-setup-action-cli@main
- with:
- filepath: ./release/build-windows.iss
- variables: /DMyAppVersion=${{ env.VERSION }} /DMyAppId=${{ secrets.MYAPPID }}
- - name: Upload Setup
- uses: actions/upload-artifact@v4
- with:
- name: windows-release
- path: ./out/MusicFreeSetup.exe
- - name: Generate Portable
- run: mkdir ./out/MusicFree-win32-x64/portable
- - uses: vimtor/action-zip@v1.1
- with:
- files: ./out/MusicFree-win32-x64
- dest: MusicFree-win32-x64-portable.zip
- - name: Upload Portable
- uses: actions/upload-artifact@v4
- with:
- name: windows-portable-release
- path: ${{ github.workspace }}/MusicFree-win32-x64-portable.zip
- build-windows-legacy:
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-node@v4
- with:
- node-version: 18
- - run: echo (node -p -e '`VERSION=${require("./package.json").version}`') >> $Env:GITHUB_ENV
- - run: npm install
- - run: npm install electron@22
- - run: npm run package
- - uses: maotoumao/inno-setup-action-cli@main
- with:
- filepath: ./release/build-windows.iss
- variables: /DMyAppVersion=${{ env.VERSION }} /DMyAppId=${{ secrets.MYAPPID }}
- - name: Upload Setup
- uses: actions/upload-artifact@v4
- with:
- name: windows-legacy-release
- path: ./out/MusicFreeSetup.exe
- - name: Generate Portable
- run: mkdir ./out/MusicFree-win32-x64/portable
- - uses: vimtor/action-zip@v1.1
- with:
- files: ./out/MusicFree-win32-x64
- dest: MusicFree-win32-x64-legacy-portable.zip
- - name: Upload Portable
- uses: actions/upload-artifact@v4
- with:
- name: windows-legacy-portable-release
- path: ${{ github.workspace }}/MusicFree-win32-x64-legacy-portable.zip
- build-macos-x64:
- runs-on: macos-13
- steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-python@v4
- with:
- python-version: '3.10'
- - uses: actions/setup-node@v4
- with:
- node-version: 18
- - run: node -p -e '`VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
- - run: npm install
- - run: npm run make
- - run: ls ./out/make
- - name: Upload Setup
- uses: actions/upload-artifact@v4
- with:
- name: macos-x64-dmg-release
- path: ./out/make/MusicFree-${{ env.VERSION }}-x64.dmg
- build-macos-arm64:
- runs-on: macos-latest
- steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-python@v4
- with:
- python-version: '3.10'
- - uses: actions/setup-node@v4
- with:
- node-version: 18
- - run: node -p -e '`VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
- - run: npm install
- - run: npm run make -- --arch="arm64"
- - name: Upload Setup
- uses: actions/upload-artifact@v4
- with:
- name: macos-arm64-dmg-release
- path: ./out/make/MusicFree-${{ env.VERSION }}-arm64.dmg
- build-ubuntu:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-node@v4
- with:
- node-version: 18
- - run: node -p -e '`VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
- - run: npm install
- - run: npm run make
- - name: Upload Setup
- uses: actions/upload-artifact@v4
- with:
- name: ubuntu-release
- path: ./out/make/deb/x64/
|