Skip to content

Commit

Permalink
workflow: overhaul
Browse files Browse the repository at this point in the history
- Bump actions/* containers to latest versions
- remove actions/setup-python for macOS and Linux
  - rely on built-in versions of these instead
  - Linux VM bumped to 20.04 to cope with this
  - Windows still needs this
- Fix Windows VM not using the correct Python version
  to setup
- Fix cx_Freeze installation on Windows VM
  • Loading branch information
lifehackerhansol committed Nov 29, 2022
1 parent 059bbf0 commit c299a32
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 40 deletions.
33 changes: 13 additions & 20 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: |
make dist
- name: Publish
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: dist
name: YANBF
Expand All @@ -40,18 +40,19 @@ jobs:
needs: generator
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: YANBF
path: YANBF
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
py -m pip install -r YANBF/generator/requirements.txt
py -m pip install cx-Freeze
python -m pip install -r YANBF/generator/requirements.txt
python -m pip install cx_Logging
python -m pip install cx-Freeze
- name: Create package
run: |
curl -LJO "https://github.com/Epicpkmn11/bannertool/releases/latest/download/bannertool.zip"
Expand All @@ -61,12 +62,12 @@ jobs:
unzip makerom-v0.18-win_x86_64.zip
mv -f makerom.exe YANBF/generator/makerom.exe
cd YANBF/generator
py setup.py build
python setup.py build
cp -r dist/* .
rm -rf *.py dist __pycache__ dist requirements.txt
shell: bash
- name: Publish
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: YANBF
name: YANBF-Windows
Expand All @@ -78,14 +79,10 @@ jobs:
needs: generator
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: YANBF
path: YANBF
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python3 -m pip install -r YANBF/generator/requirements.txt
Expand All @@ -109,26 +106,22 @@ jobs:
cd YANBF
zip -r ../actions/YANBF-macOS.zip *
- name: Publish
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: actions
name: YANBF-macOS

linux:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
name: Build Linux
if: ${{ success() && !startsWith(github.ref, 'refs/pull') }}
needs: generator
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: YANBF
path: YANBF
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip3 install -r YANBF/generator/requirements.txt
Expand All @@ -152,7 +145,7 @@ jobs:
cd YANBF
zip -r ../actions/YANBF-Linux.zip *
- name: Publish
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: actions
name: YANBF-Linux
33 changes: 13 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: |
make dist
- name: Publish
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: dist
name: YANBF
Expand All @@ -33,18 +33,19 @@ jobs:
needs: generator
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: YANBF
path: YANBF
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
py -m pip install -r YANBF/generator/requirements.txt
py -m pip install cx-Freeze
python -m pip install -r YANBF/generator/requirements.txt
python -m pip install cx_Logging
python -m pip install cx-Freeze
- name: Create package
run: |
curl -LJO "https://github.com/Epicpkmn11/bannertool/releases/latest/download/bannertool.zip"
Expand All @@ -56,13 +57,13 @@ jobs:
curl -LJO "https://github.com/YANBForwarder/GUI/releases/latest/download/YANBF-GUI.exe"
mv -f YANBF-GUI.exe YANBF/generator/YANBF-GUI.exe
cd YANBF/generator
py setup.py build
python setup.py build
cp -r dist/* .
rm -rf *.py dist __pycache__ dist requirements.txt
cd ../..
shell: bash
- name: Publish
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: YANBF
name: YANBF-Windows
Expand All @@ -74,14 +75,10 @@ jobs:
needs: generator
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: YANBF
path: YANBF
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python3 -m pip install -r YANBF/generator/requirements.txt
Expand Down Expand Up @@ -109,26 +106,22 @@ jobs:
cd YANBF
zip -r ../actions/YANBF-macOS.zip *
- name: Publish
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: actions
name: YANBF-macOS

linux:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
name: Build Linux
if: ${{ success() && !startsWith(github.ref, 'refs/pull') }}
needs: generator
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: YANBF
path: YANBF
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip3 install -r YANBF/generator/requirements.txt
Expand All @@ -155,7 +148,7 @@ jobs:
cd YANBF
zip -r ../actions/YANBF-Linux.zip *
- name: Publish
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: actions
name: YANBF-Linux
Expand Down

0 comments on commit c299a32

Please sign in to comment.