Beta Release #40
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
name: Beta Release | |
on: | |
workflow_dispatch: | |
inputs: | |
manual: | |
description: "Manual Build" | |
required: true | |
type: boolean | |
default: true | |
env: | |
DEFAULT_PYTHON: "3.10" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
beta-release: | |
name: Beta Release | |
if: github.repository == 'mgylabs/mkbot' | |
runs-on: windows-2022 | |
timeout-minutes: 60 | |
environment: | |
name: "Beta" | |
url: https://github.com/mgylabs/mkbot/releases/tag/beta | |
defaults: | |
run: | |
shell: pwsh | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install poetry | |
run: pipx install "poetry>=1.3.0,<1.4.0" | |
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
cache: "poetry" | |
cache-dependency-path: | | |
**/poetry.lock | |
.github/flags/release.flag | |
- name: Git Config | |
env: | |
GITHUB_USERNAME: ${{ secrets.DEPLOY_USER }} | |
GITHUB_TOKEN: ${{ secrets.DEPLOY_TOKEN }} | |
run: git config --global url.https://${Env:GITHUB_USERNAME}:${Env:GITHUB_TOKEN}@github.com/.insteadOf https://github.com/ | |
- name: Install dependencies | |
run: | | |
pipx runpip poetry show virtualenv | |
poetry run python -m pip install -U pip | |
poetry install --no-root --without dev -E release | |
- name: Version | |
env: | |
API_KEY: ${{ secrets.API_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
poetry run python package/vc.py --beta ; if ($LASTEXITCODE) { exit $LASTEXITCODE } | |
echo "mkbot_version=$(cat version.txt)" >> $env:GITHUB_ENV | |
if ($Env:API_KEY) { echo $Env:API_KEY > src\lib\mgylabs\constants\APIKey.py } | |
- name: Build MK Bot | |
run: | | |
poetry run scripts\build.bat --stable | |
- name: Packaging | |
run: | | |
& "${Env:programfiles(x86)}\Inno Setup 6\iscc.exe" "/DNameLong=Mulgyeol MK Bot" "/DNameShort=MK Bot" "/DVersion=${Env:mkbot_version}" "/DAppExeName=MKBot.exe" "/DAppMutex=MKBot" "/DExtDirName=.mkbot" "/DDName=mkbot" "package\MKBot.iss" | |
- name: Compress Setup | |
run: | | |
Compress-Archive -Path MKBotSetup-${Env:mkbot_version}.exe -DestinationPath MKBotSetup.zip | |
- name: Upload Release Asset | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
poetry run python package/ghtool.py -ubeta |