version #2
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: build-wwiser-stable | |
on: | |
push: | |
branches: | |
- master | |
paths: # Only run on new version | |
- "wwiser/wversion.py" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
release-new-version: | |
runs-on: windows-2022 | |
steps: | |
# Checkout your code | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Setup env | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
# Make release version tag | |
- name: Get Release Version | |
id: release_version | |
run: | | |
$WwiserVersion = $(python -c "from wwiser.wversion import WWISER_VERSION; print(WWISER_VERSION)") | |
echo "WWISER_VERSION=$WwiserVersion" >> $env:GITHUB_OUTPUT | |
# Build app | |
- name: Build WWiser | |
run: python build.py ${{ steps.release_version.outputs.wwiser_version }} | |
# Create stable release | |
- name: Create GitHub Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: ./bin/wwiser.pyz | |
name: ${{ env.WWISER_VERSION}} | |
tag_name: ${{env.WWISER_VERSION}} | |
# body_path: /path/to/CHANGELOG.TXT # If not present then it's latest commit message | |
env: | |
WWISER_VERSION: ${{ steps.release_version.outputs.wwiser_version }} |