-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from thethiny/master
Add GitHub Actions workflow
- Loading branch information
Showing
4 changed files
with
106 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: build-wwiser-nightly | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: # Run on any code change | ||
- "wwiser/**/*.py" | ||
- "wwiser.py" | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release-new-nightly: | ||
runs-on: windows-2019 | ||
|
||
steps: | ||
# Checkout your code | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Setup env | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
# Make release version tag | ||
- name: Get Release Version | ||
id: release_version | ||
run: | | ||
$DateString = Get-Date -Format "yyyyMMdd" | ||
echo "wwiser_version=$DateString" >> $env:GITHUB_OUTPUT | ||
# Build app | ||
- name: Build WWiser | ||
run: python build.py ${{ steps.release_version.outputs.wwiser_version }} | ||
|
||
# Release nightly | ||
- name: Create GitHub Release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ./bin/wwiser.pyz | ||
name: ${{ env.WWISER_VERSION}}-nightly | ||
tag_name: latest-nightly | ||
prerelease: true | ||
env: | ||
WWISER_VERSION: v${{ steps.release_version.outputs.wwiser_version }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
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-2019 | ||
|
||
steps: | ||
# Checkout your code | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Setup env | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
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@v1 | ||
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 }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.* | ||
!/.gitignore | ||
!.gitattributes | ||
!.github/ | ||
*.user | ||
*.o | ||
*.a | ||
|
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