mirror of
https://github.com/CompassConnections/Compass.git
synced 2025-12-23 22:18:43 -05:00
29 lines
635 B
Bash
Executable File
29 lines
635 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Release script for release.yaml (a GitHub Action)
|
|
# Can be run locally as well if desired
|
|
# It creates a tag based on the version in pyproject.toml and creates a GitHub release based on the tag
|
|
|
|
set -e
|
|
cd "$(dirname "$0")"/..
|
|
|
|
tag=$(node -p "require('./package.json').version")
|
|
|
|
tagged=$(git tag -l $tag)
|
|
if [ -z "$tagged" ]; then
|
|
git tag -a "$tag" -m "Release $tag"
|
|
git push origin "$tag"
|
|
echo "Tagged release $tag"
|
|
|
|
gh release create "$tag" \
|
|
--repo="$GITHUB_REPOSITORY" \
|
|
--title="$tag" \
|
|
--generate-notes
|
|
echo "Created release"
|
|
|
|
# Release to ...
|
|
|
|
else
|
|
echo "Tag $tag already exists"
|
|
fi
|