fix: update CI workflow for Gitea Actions compatibility
- Use gitea.ref instead of github.ref for tag detection - Add release job with Gitea-compatible release-action - Add lint, test, and release jobs with proper dependencies
This commit is contained in:
@@ -43,15 +43,6 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install native dependencies
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends libssl-dev libssh2-1-dev pkg-config cmake
|
||||
|
||||
- name: Set up Rust
|
||||
run: |
|
||||
rustup default stable
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
@@ -65,3 +56,30 @@ jobs:
|
||||
|
||||
- name: Run pytest
|
||||
run: python -m pytest tests/ -v --tb=short --ignore=tests/integration/
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [lint, test]
|
||||
if: startsWith(gitea.ref, 'refs/tags/')
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install build tools
|
||||
run: pip install build
|
||||
|
||||
- name: Build package
|
||||
run: python -m build
|
||||
|
||||
- name: Create Release
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
files: |
|
||||
dist/**
|
||||
|
||||
Reference in New Issue
Block a user