-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
57 additions
and
0 deletions.
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,57 @@ | ||
name: Build Windows application workflow | ||
|
||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
jobs: | ||
build-windows: | ||
runs-on: windows-lastest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
architecture: "x64" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pyinstaller | ||
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Run Pyinstaller | ||
run: | | ||
pyinstaller donatemail.spec | ||
- uses: actions/upload-artifacts@v3 | ||
with: | ||
name: DONATEMAIL | ||
path: dist/DONATEMAIL.EXE | ||
|
||
- name: create release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
#tag_name: ${{ github.event.head_commit.message }} | ||
#release_name: ${{ github.event.head_commit.message }} | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
overwrite: true | ||
generateReleaseNotes: true | ||
draft: false | ||
prerelease: false | ||
|
||
- name: upload release asset | ||
id: upload_release_asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: dist/DONATEMAIL.exe | ||
asset_name: DONATEMAIL-windows-amd64.exe | ||
asset_content_type: application/zip |