Skip to content

Commit

Permalink
chore: remove unnecessary sections from ci
Browse files Browse the repository at this point in the history
  • Loading branch information
anosora233 committed Mar 24, 2024
1 parent 57e3e64 commit 82d5455
Showing 1 changed file with 15 additions and 64 deletions.
79 changes: 15 additions & 64 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,10 @@ on:
tags:
- "*"
workflow_dispatch:
inputs:
skip-go:
required: false
skip-cpp:
required: false
skip-python:
required: false

jobs:
build-go:
build:
runs-on: windows-latest
if: github.event.inputs.skip-go != 'y'
steps:
- uses: actions/checkout@v4
with:
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: endless
path: mahjong-helper.exe

build-cpp:
runs-on: windows-latest
if: github.event.inputs.skip-cpp != 'y'
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -47,13 +19,18 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: proxinject
name: proxinject-${{ github.sha }}
path: release

build-python:
pack:
runs-on: windows-latest
if: github.event.inputs.skip-python != 'y'
needs: build
steps:
- uses: actions/download-artifact@v4
with:
name: proxinject-${{ github.sha }}
path: proxinject

- uses: actions/checkout@v4

- uses: actions/setup-python@v5
Expand All @@ -64,45 +41,19 @@ jobs:
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install pyinstaller
pyinstaller --clean mhmp.spec
####
pyinstaller --clean mhmp.spec
- uses: actions/upload-artifact@v4
with:
name: mhmp-pre
path: dist/mhmp

pack:
runs-on: ubuntu-latest
needs:
- build-go
- build-cpp
- build-python
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts

- run: |
mv artifacts/mhmp-pre mhmp
mkdir -p mhmp/common
mv artifacts/endless mhmp/common/
mv artifacts/proxinject mhmp/common/
mv dist/mhmp ./
mv proxinject mhmp/
7z a mhmp-${{ github.ref_name }}-win64.7z ./mhmp
- uses: actions/upload-artifact@v4
with:
name: develop
name: mhmp-${{ github.sha }}
path: mhmp

- if: github.ref_type == 'tag'
run: |
7z a common-win64.7z ./mhmp/common
7z a mhmp-${{ github.ref_name }}-win64.7z ./mhmp
- if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.PAT }}
files: |
common-win64.7z
mhmp-${{ github.ref_name }}-win64.7z
files: mhmp-${{ github.ref_name }}-win64.7z

0 comments on commit 82d5455

Please sign in to comment.