Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .github/workflows/pypi_publish.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down