Skip to content

Commit

Permalink
Merge pull request #51 from Quark-Games/development
Browse files Browse the repository at this point in the history
Update release.yml
  • Loading branch information
zwang20 authored Apr 18, 2022
2 parents 7eb2530 + ae11d7c commit 8dbcfac
Showing 1 changed file with 29 additions and 15 deletions.
44 changes: 29 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,23 @@ concurrency: build-and-release-${{ github.ref }}

on:
push:
branches: [master, experimental]
branches: [master, experimental, development]

jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest, macos-10.15]
os: [
macos-latest,
ubuntu-latest,
windows-latest,
macos-10.15,
macos-11,
windows-2019,
windows-2022,
ubuntu-18.04,
ubuntu-20.04,
]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
Expand All @@ -24,23 +34,23 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build on unix
if: matrix.os != 'windows-latest'
if: ${{ ! contains( matrix.os, 'windows' ) }}
run: |
pyinstaller --onefile ./main.py
mv dist/main ./main
chmod +x main
zip -r ${{ matrix.os }}.zip main assets
- name: Build on windows
if: matrix.os == 'windows-latest'
if: ${{ contains( matrix.os, 'windows' ) }}
run: |
pyinstaller --onefile ./main.py
mv dist/main.exe ./main.exe
Compress-Archive main.exe windows-latest.zip
Compress-Archive assets -Update windows-latest.zip
Compress-Archive main.exe ${{ matrix.os }}.zip
Compress-Archive assets -Update ${{ matrix.os }}.zip
- name: Upload build
uses: actions/upload-artifact@v2
with:
name: "${{ matrix.os }}"
name: "release"
path: "${{ matrix.os }}.zip"
retention-days: 1
release:
Expand All @@ -60,10 +70,7 @@ jobs:
title: "Latest Stable Release"
prerelease: false
files: |
ubuntu-latest/ubuntu-latest.zip
macos-latest/macos-latest.zip
windows-latest/windows-latest.zip
macos-10.15/macos-10.15.zip
release/*.zip
- name: Release experimental builds
if: github.ref == 'refs/heads/experimental'
uses: "marvinpinto/action-automatic-releases@latest"
Expand All @@ -73,8 +80,15 @@ jobs:
title: "Latest Experimental Release"
prerelease: true
files: |
ubuntu-latest/ubuntu-latest.zip
macos-latest/macos-latest.zip
windows-latest/windows-latest.zip
macos-10.15/macos-10.15.zip
release/*.zip
- name: Release development builds
if: github.ref == 'refs/heads/development'
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest-development"
title: "Latest Development Release"
prerelease: true
files: |
release/*.zip

0 comments on commit 8dbcfac

Please sign in to comment.