-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ykwen
committed
Dec 17, 2023
1 parent
02ef286
commit c61fee3
Showing
5 changed files
with
102 additions
and
43 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, windows-latest] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build Mac Electron package | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
run: npm run build:mac | ||
env: | ||
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
|
||
- name: Build Windows Electron package | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
run: npm run build:win | ||
env: | ||
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
|
||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Publish release | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
run: gh release edit ${{ github.ref_name }} --draft=false | ||
env: | ||
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
|
||
# - name: Create release | ||
# uses: softprops/action-gh-release@v1 | ||
# if: startsWith(github.ref, 'refs/tags/') | ||
# with: | ||
# token: ${{ secrets.RELEASE_TOKEN }} | ||
# files: | | ||
# ./release/${{ github.ref }}/GemChat-Windows-${{ github.ref }}-Setup.exe |
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
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
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
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