From b5ede2b184929df9677ce6d0e3202d8a98605c53 Mon Sep 17 00:00:00 2001 From: Michael K-F <63935978+MichaelK-F@users.noreply.github.com> Date: Mon, 30 Dec 2024 23:27:49 +0800 Subject: [PATCH 1/5] idk if that will fix it --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7704f6b..0306b0c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Node.js uses: actions/setup-node@v3 @@ -29,7 +29,7 @@ jobs: env: GH_TOKEN: secrets.GITHUB_TOKEN - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: electron-app path: 'dist/schoolboxdrive Setup 0.1.0.exe' From 0bd46d97bc9c99ab31ce74a5080c4bb6bc34fe44 Mon Sep 17 00:00:00 2001 From: Michael K-F <63935978+MichaelK-F@users.noreply.github.com> Date: Mon, 30 Dec 2024 23:34:13 +0800 Subject: [PATCH 2/5] {insert commit message here} --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0306b0c..942dc79 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: env: GH_TOKEN: secrets.GITHUB_TOKEN - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: electron-app path: 'dist/schoolboxdrive Setup 0.1.0.exe' From d8ed80ec28994d52f49fd215a7e522c6a2fd427b Mon Sep 17 00:00:00 2001 From: Michael K-F <63935978+MichaelK-F@users.noreply.github.com> Date: Mon, 30 Dec 2024 23:40:20 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E2=80=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 942dc79..933c590 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,3 +54,4 @@ jobs: asset_path: 'dist/schoolboxdrive Setup 0.1.0.exe' asset_name: electron-app.exe asset_content_type: application/zip + tag_name: '0.1.0' From a7b88d601cc928e2dacf1fdf88676096efefa009 Mon Sep 17 00:00:00 2001 From: Michael K-F <63935978+MichaelK-F@users.noreply.github.com> Date: Mon, 30 Dec 2024 23:49:04 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E2=80=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 933c590..3e7b31c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,19 +20,23 @@ jobs: node-version: '14' - name: Install dependencies + run: npm install + + - name: Extract Version + id: version run: | - npm install + echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV - name: Build Electron app - run: | - npm run build:win + run: npm run build:win env: - GH_TOKEN: secrets.GITHUB_TOKEN + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload artifact uses: actions/upload-artifact@v4 with: name: electron-app - path: 'dist/schoolboxdrive Setup 0.1.0.exe' + path: dist/schoolboxdrive_Setup_${{ env.VERSION }}.exe - name: Create release id: create_release @@ -40,18 +44,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.event.release.tag_name }} - release_name: Release ${{ github.event.release.tag_name }} - - - - name: Publish release - id: publish_release + tag_name: ${{ github.ref_name || github.event.release.tag_name || 'v0.1.0' }} + release_name: Release ${{ github.ref_name || github.event.release.tag_name || 'v0.1.0' }} + body: | + Changelog or release notes go here. + draft: false + prerelease: false + + - name: Publish release asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: 'dist/schoolboxdrive Setup 0.1.0.exe' - asset_name: electron-app.exe - asset_content_type: application/zip - tag_name: '0.1.0' + asset_path: dist/schoolboxdrive_Setup_${{ env.VERSION }}.exe + asset_name: schoolboxdrive_Setup_${{ env.VERSION }}.exe + asset_content_type: application/x-msdownload From 6d4354c1d849b53313f08efe641bbdff00784a79 Mon Sep 17 00:00:00 2001 From: Michael K-F <63935978+MichaelK-F@users.noreply.github.com> Date: Mon, 30 Dec 2024 23:54:20 +0800 Subject: [PATCH 5/5] Update build.yml --- .github/workflows/build.yml | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3e7b31c..d3d4df1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,23 +20,19 @@ jobs: node-version: '14' - name: Install dependencies - run: npm install - - - name: Extract Version - id: version run: | - echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV + npm install - name: Build Electron app - run: npm run build:win + run: | + npm run build:win env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - + GH_TOKEN: secrets.GITHUB_TOKEN - name: Upload artifact uses: actions/upload-artifact@v4 with: name: electron-app - path: dist/schoolboxdrive_Setup_${{ env.VERSION }}.exe + path: 'dist/schoolboxdrive Setup 0.1.0.exe' - name: Create release id: create_release @@ -44,19 +40,17 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref_name || github.event.release.tag_name || 'v0.1.0' }} - release_name: Release ${{ github.ref_name || github.event.release.tag_name || 'v0.1.0' }} - body: | - Changelog or release notes go here. - draft: false - prerelease: false - - - name: Publish release asset + tag_name: 0.0.1 + release_name: Release ${{ github.event.release.tag_name }} + + + - name: Publish release + id: publish_release uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: dist/schoolboxdrive_Setup_${{ env.VERSION }}.exe - asset_name: schoolboxdrive_Setup_${{ env.VERSION }}.exe - asset_content_type: application/x-msdownload + asset_path: 'dist/schoolboxdrive Setup 0.1.0.exe' + asset_name: electron-app.exe + asset_content_type: application/zip