This repository has been archived by the owner on Nov 14, 2024. It is now read-only.
Fix token variable in create-release action #5
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 | |
uses: actions/create-release@v1 | |
with: | |
repo_token: ${{ secrets.TOKEN }} | |
tag_name: v0.2.15 | |
release_name: Pre-Release v0.2.15 | |
body: | | |
First pre-release of SweePy | |
draft: false | |
prerelease: true | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: SweePy.exe | |
path: dist/SweePy.exe |