Skip to content

Commit

Permalink
build: fix release action in ci-cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MountainGod2 committed Sep 26, 2024
1 parent d1633ac commit 53eefb9
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -99,8 +98,8 @@ jobs:
uses: python-semantic-release/[email protected]
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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 53eefb9

Please sign in to comment.