mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-05-05 09:09:25 -05:00
Fix: More Path Filtering (#1448)
* fix: run on all sdk changes * fix: check versions before publishing * fix: dummy change to publish TS
This commit is contained in:
@@ -11,7 +11,7 @@ on:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'sdks/python/pyproject.toml'
|
||||
- 'sdks/python/**'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -171,6 +171,14 @@ jobs:
|
||||
|
||||
- name: Run publish.sh script
|
||||
run: |
|
||||
CURRENT_PYPI_VERSION=$(pip index versions hatchet-sdk | awk 'NR==1 {gsub(/[()]/,"",$2); print $2}')
|
||||
NEW_VERSION=$(cat pyproject.toml| grep "^version =" | cut -d '"' -f 2)
|
||||
|
||||
if [ "$CURRENT_PYPI_VERSION" == "$NEW_VERSION" ]; then
|
||||
echo "Version has not changed. Skipping publish."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
sh publish.sh
|
||||
env:
|
||||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }}
|
||||
|
||||
@@ -11,7 +11,7 @@ on:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'sdks/typescript/package.json'
|
||||
- 'sdks/typescript/**'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -200,6 +200,12 @@ jobs:
|
||||
- name: Build and Publish SDK
|
||||
run: |
|
||||
VERSION=$(jq '.version' package.json)
|
||||
CURRENT_NPM_VERSION=$(pnpm view @hatchet-dev/typescript-sdk version)
|
||||
|
||||
if [[ "$VERSION" == "$CURRENT_NPM_VERSION" ]]; then
|
||||
echo "Version has not changed. Skipping publish."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
## If the version contains `alpha`, it's an alpha version
|
||||
## and we should tag it as such.=
|
||||
|
||||
@@ -25,6 +25,7 @@ durableSleep.durableTask({
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
console.log('res', res);
|
||||
return {
|
||||
Value: 'done',
|
||||
|
||||
Reference in New Issue
Block a user