diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index cb8e794d..7012c9a5 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -76,13 +76,12 @@ jobs: personal_token: ${{ secrets.PERSONAL_TOKEN }} publish_dir: docs/_build/html - cd: + release: + runs-on: ubuntu-latest + needs: ci permissions: - id-token: write contents: write - needs: ci - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - runs-on: ubuntu-latest + id-token: write steps: - name: Checkout repository uses: actions/checkout@v4 @@ -99,8 +98,8 @@ jobs: uses: python-semantic-release/python-semantic-release@v9.8.8 with: github_token: ${{ secrets.GITHUB_TOKEN }} - outputs: - version: ${{ steps.release.outputs.new_version }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Publish to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 @@ -131,7 +130,7 @@ jobs: build: runs-on: ubuntu-latest - needs: cd + needs: release if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - name: Docker meta @@ -175,7 +174,7 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: | ghcr.io/mountaingod2/chaturbate_poller:latest - ghcr.io/mountaingod2/chaturbate_poller:${{ steps.release.outputs.version }} + ghcr.io/mountaingod2/chaturbate_poller:${{ needs.release.outputs.version }} labels: ${{ steps.meta.outputs.labels }} - name: Run tests on Docker image