Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add prefect-datahub publish workflow #303

Merged
merged 1 commit into from
Dec 24, 2024
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
54 changes: 54 additions & 0 deletions .github/workflows/publish-prefect-plugin-pypi-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: pypi-release prefect-datahub
on:
workflow_dispatch:
release:
types: [published]

jobs:
setup:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate ref format
run: |
source .github/scripts/docker_helpers.sh
validate_github_ref_for_python_tag
- name: Compute Tag
id: tag
run: |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[actionlint] reported by reviewdog 🐶
shellcheck reported issue in this script: SC2034:warning:2:1: SHORT_SHA appears unused. Verify use (or export if used externally) [shellcheck]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[actionlint] reported by reviewdog 🐶
shellcheck reported issue in this script: SC2001:style:3:7: See if you can use ${variable//search/replace} instead [shellcheck]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[actionlint] reported by reviewdog 🐶
shellcheck reported issue in this script: SC2086:info:3:12: Double quote to prevent globbing and word splitting [shellcheck]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[actionlint] reported by reviewdog 🐶
shellcheck reported issue in this script: SC2086:info:4:20: Double quote to prevent globbing and word splitting [shellcheck]

echo "GITHUB_REF: $GITHUB_REF"
SHORT_SHA=$(git rev-parse --short "$GITHUB_SHA")
TAG=$(echo ${GITHUB_REF} | sed -e 's,refs/tags/v,,g')
echo "tag=$TAG" >> $GITHUB_OUTPUT
push_to_pypi:
name: Build and push python package to PyPI
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: 17
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
- name: Install dependencies
run: ./metadata-ingestion/scripts/install_deps.sh
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
RELEASE_SKIP_TEST: "true"
run: |
cd metadata-ingestion-modules/prefect-plugin
RELEASE_VERSION=${{ needs.setup.outputs.tag }} ./scripts/release.sh
Loading