Merge pull request #220 from langflow-ai/ci-releases
only release on tag change
This commit is contained in:
commit
606d532abb
1 changed files with 12 additions and 0 deletions
12
.github/workflows/build-multiarch.yml
vendored
12
.github/workflows/build-multiarch.yml
vendored
|
|
@ -30,6 +30,14 @@ jobs:
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
echo "Version: $VERSION"
|
echo "Version: $VERSION"
|
||||||
|
|
||||||
|
# Check if tag already exists
|
||||||
|
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
|
||||||
|
echo "Tag v$VERSION already exists, skipping release"
|
||||||
|
echo "skip_release=true" >> $GITHUB_OUTPUT
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "skip_release=false" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# Check if version is numeric (e.g., 0.1.16) vs prerelease (e.g., 0.1.16-rc1)
|
# Check if version is numeric (e.g., 0.1.16) vs prerelease (e.g., 0.1.16-rc1)
|
||||||
if [[ "$VERSION" =~ ^[0-9.-]+$ ]]; then
|
if [[ "$VERSION" =~ ^[0-9.-]+$ ]]; then
|
||||||
echo "is_prerelease=false" >> $GITHUB_OUTPUT
|
echo "is_prerelease=false" >> $GITHUB_OUTPUT
|
||||||
|
|
@ -40,10 +48,12 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Build wheel and source distribution
|
- name: Build wheel and source distribution
|
||||||
|
if: steps.version.outputs.skip_release != 'true'
|
||||||
run: |
|
run: |
|
||||||
uv build
|
uv build
|
||||||
|
|
||||||
- name: List built artifacts
|
- name: List built artifacts
|
||||||
|
if: steps.version.outputs.skip_release != 'true'
|
||||||
run: |
|
run: |
|
||||||
ls -la dist/
|
ls -la dist/
|
||||||
echo "Built artifacts:"
|
echo "Built artifacts:"
|
||||||
|
|
@ -52,6 +62,7 @@ jobs:
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
|
if: steps.version.outputs.skip_release != 'true'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: python-packages
|
name: python-packages
|
||||||
|
|
@ -59,6 +70,7 @@ jobs:
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
|
if: steps.version.outputs.skip_release != 'true'
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: v${{ steps.version.outputs.version }}
|
tag_name: v${{ steps.version.outputs.version }}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue