Skip to content

Commit

Permalink
Add release script
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaser committed Sep 25, 2024
1 parent d3549f1 commit d99ae04
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions build/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash -xe

VERSION=$1
LATEST_VERSION=$2

if [ -z "$VERSION" ] || [ -z "$LATEST_VERSION" ]; then
echo "Usage: $0 <version> <latest_version>"
exit 1
fi

# Update the version
sed -i s/^version:.*/version:\ $VERSION/ galaxy.yml
sed -i s/^atmosphere_version:.*/atmosphere_version:\ $VERSION/ roles/defaults/defaults/main.yml

# Create release commit
git add galaxy.yml roles/defaults/defaults/main.yml
git commit -m "Release $VERSION"

# Push the release commit
git push

# Create GitHub release with gh CLI
gh release create v$VERSION --target $(git rev-parse HEAD) --generate-notes --latest=$LATEST_VERSION

0 comments on commit d99ae04

Please sign in to comment.