Skip to content

Commit

Permalink
add release script
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasRosenstein committed Oct 14, 2024
1 parent 64fcd2c commit 873d3d5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

if [ -n "$(git log "origin/$(git rev-parse --abbrev-ref HEAD)"..HEAD)" ]; then
echo "Error: There are unpushed commits on the current branch. Please push all changes before creating a release."
exit 1
fi

LATEST_TAG="$(git describe --tags --abbrev=0)"
COMMITS="$(git log "$LATEST_TAG..HEAD" --pretty=format:'- %h %s')"

# Create a release on GitHub
gh release create "$1" --notes "$COMMITS"
git fetch --tags

0 comments on commit 873d3d5

Please sign in to comment.