Skip to content

Commit

Permalink
chore: auto build for common utils
Browse files Browse the repository at this point in the history
  • Loading branch information
anosora233 committed Mar 14, 2024
1 parent 26e788f commit cdb1689
Show file tree
Hide file tree
Showing 26 changed files with 59 additions and 221 deletions.
77 changes: 58 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,77 @@ on:
workflow_dispatch:

jobs:
pack:
build-go:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
repository: anosora233/mahjong-helper

- uses: actions/setup-go@v5
with:
go-version: ^1.22

- run: |
go build -v
- uses: actions/upload-artifact@v4
with:
name: mahjong-helper-${{ github.sha }}
path: mahjong-helper.exe

build-python:
runs-on: windows-latest
steps:
- name: Checking out sources
uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup python
uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: 3.12

- name: Build
run: |
- run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install pyinstaller
####
pyinstaller --clean mhmp.spec
mv common dist/mhmp/
- name: Create archives
run: 7z a mhmp-${{ github.ref_name }}-win64.7z ./dist/mhmp
- uses: actions/upload-artifact@v4
with:
name: mhmp-pre-${{ github.sha }}
path: dist/mhmp

pack:
runs-on: ubuntu-latest
needs:
- build-go
- build-python
steps:
- uses: actions/download-artifact@v4
with:
path: mhmp
merge-multiple: true

- run: |
mkdir -p mhmp/common/endless
mv mhmp/mahjong-helper.exe mhmp/common/endless/
####
curl -Lo proxinject.zip https://github.com/PragmaTwice/proxinject/releases/download/v0.5.0-pre/proxinject-v0.5.0-pre-x64.zip
unzip proxinject.zip -d proxinject
mv proxinject/release mhmp/common/proxinject
####
7z a mhmp-${{ github.ref_name }}-win64.7z mhmp
- name: Uploading Artifact
uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v4
with:
name: development-${{ github.sha }}
name: mhmp-${{ github.sha }}
path: mhmp-${{ github.ref_name }}-win64.7z

- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
- uses: softprops/action-gh-release@v1
if: github.ref_type == 'tag'
with:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
token: ${{ secrets.PAT }}
files: mhmp-${{ github.ref_name }}-win64.7z
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ cython_debug/

# Data
log/
common/
account/
/*.json

Expand Down
Binary file removed common/endless/mahjong-helper.exe
Binary file not shown.
202 changes: 0 additions & 202 deletions common/proxinject/LICENSE

This file was deleted.

Binary file removed common/proxinject/cairo-2.dll
Binary file not shown.
Binary file removed common/proxinject/expat.dll
Binary file not shown.
Binary file removed common/proxinject/fontconfig-1.dll
Binary file not shown.
Binary file removed common/proxinject/freetype-6.dll
Binary file not shown.
Binary file removed common/proxinject/pixman-1-0.dll
Binary file not shown.
Binary file removed common/proxinject/png16-16.dll
Binary file not shown.
Binary file removed common/proxinject/proxinjectee.dll
Binary file not shown.
Binary file removed common/proxinject/proxinjectee32.dll
Binary file not shown.
Binary file removed common/proxinject/proxinjector-cli.exe
Binary file not shown.
Binary file removed common/proxinject/proxinjector.exe
Binary file not shown.
Binary file removed common/proxinject/resources/OpenSans-Bold.ttf
Binary file not shown.
Binary file removed common/proxinject/resources/OpenSans-Light.ttf
Binary file not shown.
Binary file removed common/proxinject/resources/OpenSans-Regular.ttf
Binary file not shown.
Binary file removed common/proxinject/resources/OpenSans-SemiBold.ttf
Binary file not shown.
Binary file not shown.
Binary file removed common/proxinject/resources/Roboto-Bold.ttf
Binary file not shown.
Binary file removed common/proxinject/resources/Roboto-Light.ttf
Binary file not shown.
Binary file removed common/proxinject/resources/Roboto-Medium.ttf
Binary file not shown.
Binary file removed common/proxinject/resources/Roboto-Regular.ttf
Binary file not shown.
Binary file removed common/proxinject/resources/elements_basic.ttf
Binary file not shown.
Binary file removed common/proxinject/wow64-address-dumper.exe
Binary file not shown.
Binary file removed common/proxinject/z.dll
Binary file not shown.

0 comments on commit cdb1689

Please sign in to comment.