Skip to content

Commit

Permalink
Add build app workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tledoux committed Aug 7, 2024
1 parent a65df24 commit f17ce36
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/build-win-app.yml
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

0 comments on commit f17ce36

Please sign in to comment.