Skip to content

Commit

Permalink
ci: test
Browse files Browse the repository at this point in the history
  • Loading branch information
nailiable committed Dec 2, 2024
1 parent d90b8bc commit bd256ea
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,8 @@ jobs:
- name: Build Electron App
run: pnpm -F ui run build:${{ matrix.os == 'windows-latest' && 'win' || 'mac' }}

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: electron-app-${{ matrix.os }}
path: ui/release/
- name: Debug: List release directory
run: ls -al ui/release/

- name: Read version from package.json
id: get_version
Expand All @@ -53,20 +50,31 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: auto-pub-v${{ env.VERSION }}
tag_name: v${{ env.VERSION }}
release_name: Release v${{ env.VERSION }}
body: |
This is an automated release generated by GitHub Actions.
draft: false
prerelease: false

- name: Upload Release Asset
if: ${{ github.event_name == 'push' }}
- name: Upload macOS Release Asset (.dmg)
if: ${{ matrix.os == 'macos-latest' && github.event_name == 'push' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ui/release/*.dmg
asset_name: electron-app-macos-v${{ env.VERSION }}.dmg
asset_content_type: application/x-apple-diskimage

- name: Upload Windows Release Asset (.exe)
if: ${{ matrix.os == 'windows-latest' && github.event_name == 'push' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ui/release/
asset_name: electron-app-${{ matrix.os }}-v${{ env.VERSION }}.zip
asset_content_type: application/zip
asset_path: ui/release/*.exe
asset_name: electron-app-windows-v${{ env.VERSION }}.exe
asset_content_type: application/vnd.microsoft.portable-executable

0 comments on commit bd256ea

Please sign in to comment.