diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml index 969005160..1d63c9cc6 100644 --- a/.github/workflows/pypi_publish.yml +++ b/.github/workflows/pypi_publish.yml @@ -1,3 +1,7 @@ +# This workflow builds the python package. +# On release tags, it also publishes to PyPI and DockerHub. +# If we rename the workflow file name, we have to also update the +# Trusted Publisher settings on PyPI. name: Packaging and Publishing on: @@ -61,6 +65,9 @@ jobs: if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest needs: [publish] + environment: + name: DockerHub + url: https://hub.docker.com/r/airbyte/source-declarative-manifest/tags steps: - uses: actions/checkout@v4 @@ -70,14 +77,22 @@ jobs: - name: Set Version (workflow_dispatch) if: github.event_name == 'workflow_dispatch' run: | - echo "Version set to ${{ github.event.inputs.version }}" - echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV + VERSION=${{ github.event.inputs.version }} + echo "Version input set to '${VERSION}'" + # Remove the 'v' prefix if it exists + VERSION=${VERSION#v} + echo "Setting version to '$VERSION'" + echo "VERSION=${VERSION}" >> $GITHUB_ENV - name: Set Version (tag) if: startsWith(github.ref, 'refs/tags/v') run: | - echo "Version set to ${{ github.ref_name }}" - echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV + VERSION=${{ github.ref_name }} + echo "Version ref set to '${VERSION}'" + # Remove the 'v' prefix if it exists + VERSION=${VERSION#v} + echo "Setting version to '$VERSION'" + echo "VERSION=${VERSION}" >> $GITHUB_ENV # We need to download the build artifact again because the previous job was on a different runner - name: Download Build Artifact