Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kokofixcomputers authored Nov 29, 2024
1 parent 150c189 commit 6e4ee41
Showing 1 changed file with 26 additions and 35 deletions.
61 changes: 26 additions & 35 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,13 @@ jobs:
run: |
pyinstaller --onefile commitify.py
- name: List files after build (Linux)
run: |
ls dist/
- name: Move Linux executable
run: |
mv dist/commitify ./commitify-linux
- name: Upload Linux artifact
uses: actions/upload-artifact@v4 # Updated to v4
with:
name: linux-executable
path: commitify-linux # Ensure this matches the moved file's name
- name: List files after build (Linux)
run: |
ls -al
build-windows:
runs-on: windows-latest
Expand All @@ -57,19 +51,13 @@ jobs:
run: |
pyinstaller --onefile commitify.py
- name: List files after build (Windows)
run: |
dir dist
- name: Move Windows executable
run: |
move dist\commitify.exe commitify.exe # Just rename to commitify.exe
- name: Upload Windows artifact
uses: actions/upload-artifact@v4 # Updated to v4
with:
name: windows-executable
path: commitify.exe # Ensure this matches the moved file's name
- name: List files after build (Windows)
run: |
dir
build-macos:
runs-on: macos-latest
Expand All @@ -89,19 +77,13 @@ jobs:
run: |
pyinstaller --onefile commitify.py
- name: List files after build (macOS)
run: |
ls dist/
- name: Move macOS executable
run: |
mv dist/commitify ./commitify # No suffix for macOS
- name: Upload macOS artifact
uses: actions/upload-artifact@v4 # Updated to v4
with:
name: macos-executable
path: commitify # Ensure this matches the moved file's name
- name: List files after build (macOS)
run: |
ls -al
release:
needs: [build-linux, build-windows, build-macos]
Expand All @@ -110,14 +92,23 @@ jobs:
- name: Checkout code for release job
uses: actions/checkout@v3

# Debugging step to list all files before release upload.
- name: List files before release upload
run: ls -al

# Install GitHub CLI
- name: Install GitHub CLI
run: sudo apt-get install gh # For Ubuntu; adjust for other OS if needed.

# Authenticate with GITHUB_TOKEN
- name: Authenticate with GitHub CLI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh auth login --with-token <<< "$GITHUB_TOKEN"

# Upload Release Assets using GitHub CLI
- name: Upload Release Assets
uses: softprops/action-gh-release@v1 # GitHub Action to create a release.
with:
tag_name: ${{ github.event.release.tag_name }}
files: commitify-linux, commitify.exe, commitify # Ensure these names match exactly.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.event.release.tag_name }} \
commitify-linux \
commitify.exe \
commitify \
--clobber # Use --clobber to overwrite existing files if necessary.

0 comments on commit 6e4ee41

Please sign in to comment.