PROGRESS: Mission Data Type & More #110
Workflow file for this run
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: CD | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: | |
- synchronize | |
- opened | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }} | |
cancel-in-progress: true | |
jobs: | |
linux_64_executable: | |
name: Linux x64 Executable | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OUTPUT: Bane-Of-Wargs-Linux | |
steps: | |
- name: Fix Checkout Problems | |
run: git config --global core.protectNTFS false | |
- uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: Install Python & Pip | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12.1' | |
cache: 'pip' | |
- name: Create Executable | |
run: | | |
git clone https://github.com/Dungeons-of-Kathallion/Bane-Of-Wargs.git | |
mkdir yamale | |
echo "4.0.4" >> yamale/VERSION | |
pip install -r requirements.txt | |
pip install PyInstaller | |
python -m PyInstaller --console --onefile --name Bane-Of-Wargs source/main.py source/battle.py source/check_yaml.py source/colors.py source/map_item.py source/train.py source/logger_sys.py source/mission_handling.py source/dialog_handling.py --add-data yamale/VERSION:yamale --collect-submodules fsspec --collect-submodules appdirs --hidden-import appdirs --hidden-import fsspec | |
mv dist/Bane-Of-Wargs Bane-Of-Wargs-Linux | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.OUTPUT }} | |
path: ${{ env.OUTPUT }} | |
mac_64_executable: | |
name: MacOS x64 Executable | |
if: github.event_name == 'push' | |
runs-on: macos-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OUTPUT: Bane-Of-Wargs-Mac | |
steps: | |
- name: Fix Checkout Problems | |
run: git config --global core.protectNTFS false | |
- uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: Install Python & Pip | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12.1' | |
cache: 'pip' | |
- name: Create Executable | |
run: | | |
git clone https://github.com/Dungeons-of-Kathallion/Bane-Of-Wargs.git | |
mkdir yamale | |
echo "4.0.4" >> yamale/VERSION | |
pip install -r requirements.txt | |
pip install PyInstaller | |
python -m PyInstaller --console --onefile --name Bane-Of-Wargs source/main.py source/battle.py source/check_yaml.py source/colors.py source/map_item.py source/train.py source/logger_sys.py source/mission_handling.py source/dialog_handling.py --add-data yamale/VERSION:yamale --collect-submodules fsspec --collect-submodules appdirs --hidden-import appdirs | |
mv dist/Bane-Of-Wargs Bane-Of-Wargs-Mac | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.OUTPUT }} | |
path: ${{ env.OUTPUT }} | |
windows_64_executable: | |
name: Windows x64 Executable | |
if: github.event_name == 'push' | |
runs-on: windows-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OUTPUT: Bane-Of-Wargs.exe | |
steps: | |
- name: Fix Checkout Problems | |
run: git config --global core.protectNTFS false | |
- uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: Install Python & Pip | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12.1' | |
cache: 'pip' | |
- name: Create Executable | |
run: | | |
git clone https://github.com/Dungeons-of-Kathallion/Bane-Of-Wargs.git | |
mkdir yamale | |
echo "4.0.4" >> yamale/VERSION | |
pip install -r requirements.txt | |
pip install windows-curses PyInstaller | |
python -m PyInstaller --console --onefile --name Bane-Of-Wargs source/main.py source/battle.py source/check_yaml.py source/colors.py source/map_item.py source/train.py source/logger_sys.py source/mission_handling.py source/dialog_handling.py --add-data yamale/VERSION:yamale --collect-submodules fsspec --collect-submodules appdirs --hidden-import appdirs --hidden-import fsspec | |
mv dist/Bane-Of-Wargs.exe Bane-Of-Wargs.exe | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.OUTPUT }} | |
path: ${{ env.OUTPUT }} | |
cd_upload_artifacts_to_release: | |
name: Upload | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
needs: | |
- linux_64_executable | |
- windows_64_executable | |
- mac_64_executable | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OUTPUT_LINUX: Bane-Of-Wargs-Linux | |
OUTPUT_WINDOWS: Bane-Of-Wargs.exe | |
OUTPUT_MAC: Bane-Of-Wargs-Mac | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install github-release | |
run: | | |
go install github.com/github-release/github-release@latest | |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV | |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Set environment variables | |
run: | | |
echo "GITHUB_USER=$( echo ${{ github.repository }} | cut -d/ -f1 )" >> $GITHUB_ENV | |
echo "GITHUB_REPO=$( echo ${{ github.repository }} | cut -d/ -f2 )" >> $GITHUB_ENV | |
- name: Move/Create continuous tag | |
run: | | |
git tag --force 9.9.9-continuous ${{ github.sha }} | |
git push --tags --force | |
- name: Setup continuous release | |
run: | | |
DESCRIPTION="This is an automated build triggered by commit ${{ github.sha }}" | |
if ! github-release info -t 9.9.9-continuous > /dev/null 2>&1; then | |
github-release release \ | |
--tag 9.9.9-continuous \ | |
--name "Continuous Build" \ | |
--description "$DESCRIPTION" | |
else | |
github-release edit \ | |
--tag 9.9.9-continuous \ | |
--name "Continuous Build" \ | |
--description "$DESCRIPTION" | |
fi | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: ${{ github.workspace }} | |
- name: Add ${{ env.OUTPUT_LINUX }} to release tag | |
continue-on-error: true | |
run: | | |
github-release upload \ | |
--tag 9.9.9-continuous \ | |
--replace \ | |
--name ${{ env.OUTPUT_LINUX }} \ | |
--file ${{ env.OUTPUT_LINUX }}/${{ env.OUTPUT_LINUX }} | |
- name: Add ${{ env.OUTPUT_MAC }} to release tag | |
continue-on-error: true | |
run: | | |
github-release upload \ | |
--tag 9.9.9-continuous \ | |
--replace \ | |
--name ${{ env.OUTPUT_MAC }} \ | |
--file ${{ env.OUTPUT_MAC }}/${{ env.OUTPUT_MAC }} | |
- name: Add ${{ env.OUTPUT_WINDOWS }} to release tag | |
continue-on-error: true | |
run: | | |
github-release upload \ | |
--tag 9.9.9-continuous \ | |
--replace \ | |
--name ${{ env.OUTPUT_WINDOWS }} \ | |
--file ${{ env.OUTPUT_WINDOWS }}/${{ env.OUTPUT_WINDOWS }} |