name: Release on: push: tags: - 'v*' jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.11" - name: Install dependencies run: | python -m pip install --upgrade pip pip install -e ".[dev]" - name: Run tests run: pytest tests/ -v --cov=wikijs --cov-fail-under=85 - name: Run security scan run: bandit -r wikijs build: needs: test runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.11" - name: Install build dependencies run: | python -m pip install --upgrade pip pip install build twine - name: Build package run: python -m build - name: Check package run: twine check dist/* - name: Create Release uses: softprops/action-gh-release@v1 with: generate_release_notes: true files: | dist/*.whl dist/*.tar.gz env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}