Skip to content

Commit

Permalink
update release scripts to differentiate between architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
samlhuillier committed Dec 6, 2023
1 parent 28925a3 commit 92ce2fa
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,22 @@ jobs:
- name: Set version as env
run: echo "APP_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV

- name: Rename artifacts for ARM architecture
if: matrix.os == 'macos-11'
run: |
mv ./release/${{ env.APP_VERSION }}/*.dmg ./release/${{ env.APP_VERSION }}/${{ github.event.repository.name }}_${{ env.APP_VERSION }}-arm.dmg
- name: Rename artifacts for Intel architecture
if: matrix.os == 'macos-latest'
run: |
mv ./release/${{ env.APP_VERSION }}/*.dmg ./release/${{ env.APP_VERSION }}/${{ github.event.repository.name }}_${{ env.APP_VERSION }}-intel.dmg
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-app
path: |
./release/${{ env.APP_VERSION }}/**/*.exe
./release/${{ env.APP_VERSION }}/**/*.AppImage
./release/${{ env.APP_VERSION }}/**/*.dmg
./release/${{ env.APP_VERSION }}/*-arm.dmg
./release/${{ env.APP_VERSION }}/*-intel.dmg
13 changes: 12 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,25 @@ jobs:
- name: Set version as env
run: echo "APP_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV

- name: Rename artifacts for ARM architecture
if: matrix.os == 'macos-11'
run: |
mv ./release/${{ env.APP_VERSION }}/*.dmg ./release/${{ env.APP_VERSION }}/${{ github.event.repository.name }}_${{ env.APP_VERSION }}-arm.dmg
- name: Rename artifacts for Intel architecture
if: matrix.os == 'macos-latest'
run: |
mv ./release/${{ env.APP_VERSION }}/*.dmg ./release/${{ env.APP_VERSION }}/${{ github.event.repository.name }}_${{ env.APP_VERSION }}-intel.dmg
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-app
path: |
./release/${{ env.APP_VERSION }}/**/*.exe
./release/${{ env.APP_VERSION }}/**/*.AppImage
./release/${{ env.APP_VERSION }}/**/*.dmg
./release/${{ env.APP_VERSION }}/*-arm.dmg
./release/${{ env.APP_VERSION }}/*-intel.dmg
create_release:
needs: build_and_package
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"main": "dist-electron/main/index.js",
"description": "Electron Vite React boilerplate.",
"author": "草鞋没号 <308487730@qq.com>",
"license": "GPL-2.0",
"license": "GPL-3.0",
"private": false,
"debug": {
"env": {
Expand Down

0 comments on commit 92ce2fa

Please sign in to comment.