Skip to content

Commit

Permalink
Update GitHub Actions workflow to use latest action versions and impr…
Browse files Browse the repository at this point in the history
…ove release process
  • Loading branch information
JHM69 committed Dec 13, 2024
1 parent 2ff675a commit 5ab8ac4
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4 # Updated to latest version

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5 # Updated to latest version
with:
python-version: '3.8'

Expand All @@ -29,26 +29,17 @@ jobs:
pyinstaller --onefile main.py # Change 'main.py' to your main script name
- name: Upload executable
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4 # Updated to v4
with:
name: executable
path: dist/main
retention-days: 5 # Optional: specify retention period

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
- name: Create Release and Upload Assets
uses: softprops/action-gh-release@v2 # Updated to v2
if: startsWith(github.ref, 'refs/tags/') # Only run on tag pushes
with:
tag_name: v1.0.0
release_name: Release v1.0.0
draft: false
prerelease: false
files: dist/main
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Upload to Release
uses: softprops/action-gh-release@v1
with:
tag_name: v1.0.0
files: dist/main
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use built-in token instead of custom token

0 comments on commit 5ab8ac4

Please sign in to comment.