blob: e73b6137ec68458e91118ca3fce27840715aa4a4 [file] [log] [blame]
Mohammed Nasereead9b92024-09-06 09:22:39 -04001#!/bin/bash -xe
2
3VERSION=$1
4LATEST_VERSION=$2
5
6if [ -z "$VERSION" ] || [ -z "$LATEST_VERSION" ]; then
7 echo "Usage: $0 <version> <latest_version>"
8 exit 1
9fi
10
11# Update the version
12sed -i s/^version:.*/version:\ $VERSION/ galaxy.yml
13sed -i s/^atmosphere_version:.*/atmosphere_version:\ $VERSION/ roles/defaults/defaults/main.yml
14
15# Create release commit
16git add galaxy.yml roles/defaults/defaults/main.yml
17git commit -m "Release $VERSION"
18
19# Push the release commit
20git push
21
22# Create GitHub release with gh CLI
23gh release create v$VERSION --target $(git rev-parse HEAD) --generate-notes --latest=$LATEST_VERSION