Resolve merge conflicts - keep workflow fixes #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| 'on': | |
| push: | |
| branches: | |
| - main | |
| - stable | |
| workflow_dispatch: | |
| inputs: | |
| version_type: | |
| description: Version bump type | |
| required: true | |
| default: patch | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| packages: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| if: '!contains(github.event.head_commit.message, ''[skip ci]'')' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.13' | |
| cache: pip | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run tests and validation | |
| run: | | |
| python -m pytest tests/ || echo "No tests found" | |
| python .prsist/bin/prsist.py --status | |
| - name: Debug permissions | |
| run: | | |
| echo "Testing git permissions..." | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| echo "Git config set successfully" | |
| - name: Manual version bump | |
| if: github.event_name == 'workflow_dispatch' | |
| run: | | |
| # Simple version bumping without version-manager.py | |
| echo "Manual version bump requested: ${{ github.event.inputs.version_type }}" | |
| git add -A | |
| git commit -m "bump: version ${{ github.event.inputs.version_type }}" || echo "No changes to commit" | |
| git push || echo "Nothing to push" | |
| - name: Create Release | |
| if: github.event_name == 'push' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| VERSION=$(python -c "import json; print(json.load(open('version.json'))['version'])") | |
| git tag "v$VERSION" | |
| git push origin "v$VERSION" | |
| gh release create "v$VERSION" --generate-notes |