Skip to content

chore: auto release #33

chore: auto release

chore: auto release #33

Workflow file for this run

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