Skip to content

Commit

Permalink
Refactor GitHub Actions workflow: rename to 'Build and Release', add …
Browse files Browse the repository at this point in the history
…release tagging, and reorganize artifact upload steps for improved clarity and functionality.
  • Loading branch information
JHM69 committed Dec 13, 2024
1 parent 58bfe95 commit cb2b803
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy
name: Build and Release

on:
push:
Expand Down Expand Up @@ -32,28 +32,29 @@ jobs:
pip install wheel
pip install -r requirements.txt || pip install google-generativeai
- name: Verify installations
run: |
python --version
pip list
- name: Build executable
run: |
pip install pyinstaller
pyinstaller --onefile main.py
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: executable
path: dist/main
retention-days: 5
- name: Generate Release Tag
id: create_tag
run: |
TAG=v1.0.${{ github.run_number }}
echo "tag=$TAG" >> $GITHUB_OUTPUT
- name: Create Release
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ steps.create_tag.outputs.tag }}
files: dist/main
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: executable
path: dist/main
retention-days: 5

0 comments on commit cb2b803

Please sign in to comment.