name: Continuous Delivery
on:
push:
pull_request:
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Python
uses: actions/[email protected]
with:
python-version: "3.10"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install --requirement requirements.txt
pip install pyinstaller
- name: Build
run: |
pyinstaller --onefile main.py --name thu-learn-downloader-${{ matrix.os }}
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: ${{ matrix.os }}
file: dist/*
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download a Build Artifact
uses: actions/[email protected]
- run: mv identity.yaml dist/
- name: GitHub Tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ github.token }}
- name: Release
uses: softprops/[email protected]
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
files: dist/*