Fix: Downgrade upload-artifact to v3 for Gitea compatibility and add release workflow
This commit is contained in:
@@ -28,7 +28,7 @@ jobs:
|
||||
pyinstaller --onefile --name tamigo-cli tamigo.py
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: tamigo-cli-linux
|
||||
path: dist/tamigo-cli
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
pyinstaller --onefile --name tamigo-cli tamigo.py
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: tamigo-cli-windows
|
||||
path: dist/tamigo-cli.exe
|
||||
|
||||
47
.gitea/workflows/release.yml
Normal file
47
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
name: Release Tamigo CLI
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build-and-upload:
|
||||
name: Build and Upload Release Assets
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
artifact_name: tamigo-cli
|
||||
release_asset_name: tamigo-cli-linux
|
||||
- os: windows-latest
|
||||
artifact_name: tamigo-cli.exe
|
||||
release_asset_name: tamigo-cli-windows.exe
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Build with PyInstaller
|
||||
run: |
|
||||
pyinstaller --onefile --name tamigo-cli tamigo.py
|
||||
|
||||
- name: Rename binary for release
|
||||
shell: bash
|
||||
run: |
|
||||
mv dist/${{ matrix.artifact_name }} dist/${{ matrix.release_asset_name }}
|
||||
|
||||
- name: Upload to Release
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.release_asset_name }}
|
||||
path: dist/${{ matrix.release_asset_name }}
|
||||
Reference in New Issue
Block a user