This repository has been archived by the owner on Nov 14, 2024. It is now read-only.
Update version number and add known bugs section #13
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: Python CI/CD | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Build executable | |
run: python -m PyInstaller --onefile --icon=resources/images/icon.ico --name=SweePy SweePy.py | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: SweePy.exe | |
path: dist/SweePy.exe | |
release: | |
needs: build | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN }} | |
with: | |
tag_name: v1.0.0 | |
release_name: SweePy v1.0.0 | |
body: | | |
Changes in this Release: | |
- Initial release | |
Need test, please report any issue | |
draft: false | |
prerelease: false | |
- name: Get artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: SweePy.exe | |
path: dist/ | |
- name: Upload release asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/SweePy.exe | |
asset_name: SweePy.exe | |
asset_content_type: application/octet-stream |