name: Release on: push: tags: - 'v*' jobs: release: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.11' cache: 'pip' - name: Install build 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/** !dist/*.txt !dist/*.md draft: false prerelease: false name: Release ${{ github.ref_name }} body: | ## Changes See [CHANGELOG.md](CHANGELOG.md) for details. ## Installation ```bash pip install api-mock-cli==${{ github.ref_name }} ``` release-pypi: runs-on: ubuntu-latest needs: release steps: - name: Checkout repository uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.11' cache: 'pip' - name: Install build run: pip install build - name: Build package run: python -m build - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }}