Skip to content

Commit

Permalink
Merge pull request Zzaphkiel#28 from coolkiid/p/coolkiid/add-github-a…
Browse files Browse the repository at this point in the history
…ctions

[Github Actions] 添加 Github Actions
  • Loading branch information
Zzaphkiel authored Sep 10, 2023
2 parents def7130 + 936526f commit a2f09d7
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 3 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build_seraphine.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build Seraphine

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-seraphine:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
uses: actions/setup-python@v4
with:
python-version: '3.8'
cache: 'pip'
- name: Pack Seraphine
run: |
pip install -r requirements.txt
pip install pyinstaller
.\make.ps1
echo "SUCCESS=true" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@v3
if: ${{ env.SUCCESS }} == 'true'
with:
name: Seraphine
path: .\Seraphine.zip

release:
needs: build-seraphine
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup environment variables
run: |
export VERSION=`cat .version`
echo "VERSION=v$VERSION" >> $GITHUB_ENV
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: Seraphine
path: ./
- name: Push to release
uses: ncipollo/release-action@v1
with:
name: Seraphine ${{ env.VERSION }}
tag: ${{ env.VERSION }}
omitBodyDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: false
artifacts: Seraphine.zip
1 change: 1 addition & 0 deletions .version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.7.4
4 changes: 1 addition & 3 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ rni -path .\dist\Seraphine\main.exe -newName Seraphine.exe
cpi .\app -destination .\dist\Seraphine -recurse
rm -r .\dist\Seraphine\app\common
rm -r .\dist\Seraphine\app\components
rm -r .\dist\Seraphine\app\config\*
rm -r .\dist\Seraphine\app\lol
rm -r .\dist\Seraphine\app\resource\game\*
rm -r .\dist\Seraphine\app\resource\i18n\Seraphine.zh_CN.ts
rm -r .\dist\Seraphine\app\view
rar a $dest\Seraphine.rar .\dist\Seraphine\* -r -ep1
7z a $dest\Seraphine.zip .\dist\Seraphine\* -r
rm -r .\dist

0 comments on commit a2f09d7

Please sign in to comment.