From 5ab8ac44831385d4f1bbed31cb7ba09bbb4ddabf Mon Sep 17 00:00:00 2001 From: Jahangir Hossain Date: Fri, 13 Dec 2024 14:41:59 -0400 Subject: [PATCH] Update GitHub Actions workflow to use latest action versions and improve release process --- .github/workflows/main.yml | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9d93b1e..5a99f74 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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' @@ -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 }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use built-in token instead of custom token \ No newline at end of file