From 4af9594646fb91364786614a7f48f6de750acb36 Mon Sep 17 00:00:00 2001 From: kokofixcomputers Date: Sat, 30 Nov 2024 10:50:07 -0800 Subject: [PATCH] :construction_worker: chore: Add aurora channel Signed-off-by: kokodev --- .github/workflows/aurora.yaml | 143 ++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 .github/workflows/aurora.yaml diff --git a/.github/workflows/aurora.yaml b/.github/workflows/aurora.yaml new file mode 100644 index 0000000..db55de7 --- /dev/null +++ b/.github/workflows/aurora.yaml @@ -0,0 +1,143 @@ +name: Build Aurora + +on: + push: + branches: + - main + + +permissions: write-all + +jobs: + build-linux: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Dependencies + run: pip install -r requirements.txt + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Install PyInstaller + run: pip install pyinstaller + + - name: Build executable for Linux + run: | + pyinstaller --onefile commitify.py + + - name: Move Linux executable + run: | + mv dist/commitify ./commitify-linux + + - name: Upload Linux artifact + uses: actions/upload-artifact@v4 # Use v4 + with: + name: linux-executable + path: commitify-linux # Ensure this matches the moved file's name + + build-windows: + runs-on: windows-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Install Dependencies + run: pip install -r requirements.txt + + - name: Install PyInstaller + run: pip install pyinstaller + + - name: Build executable for Windows + run: | + pyinstaller --onefile commitify.py + + - 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 # Use v4 + with: + name: windows-executable + path: commitify.exe # Ensure this matches the moved file's name + + build-macos: + runs-on: macos-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Install PyInstaller + run: pip install pyinstaller + + - name: Install Dependencies + run: pip install -r requirements.txt + + - name: Build executable for macOS + run: | + pyinstaller --onefile commitify.py + + - name: Move macOS executable + run: | + mv dist/commitify ./commitify-darwin + + - name: Upload macOS artifact + uses: actions/upload-artifact@v4 # Use v4 + with: + name: macos-executable + path: commitify-darwin # Ensure this matches the moved file's name + + release: + needs: [build-linux, build-windows, build-macos] + runs-on: ubuntu-latest # This can be any OS since we are just uploading artifacts. + steps: + - name: Checkout code for release job + uses: actions/checkout@v3 + + # Download artifacts from previous jobs. + - name: Download Linux artifact + uses: actions/download-artifact@v4 # Use v4 to download artifacts. + with: + name: linux-executable + + - name: Download Windows artifact + uses: actions/download-artifact@v4 # Use v4 to download artifacts. + with: + name: windows-executable + + - name: Download macOS artifact + uses: actions/download-artifact@v4 # Use v4 to download artifacts. + with: + name: macos-executable + + # List downloaded files for debugging purposes. + - name: List downloaded files before release upload + run: ls -al + + - name: Create Pre-Release Assets using softprops/action-gh-release + uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + automatic_release_tag: "aurora" + title: "Aurora" + prerelease: true + files: | + commitify-linux + commitify.exe + commitify-darwin + commitify.py \ No newline at end of file