-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
if [ "$#" -ne 1 ]; then | ||
echo "Usage: release.sh <version>" | ||
exit 1 | ||
fi | ||
|
||
VERSION="$1" | ||
ZIP_FILE="public/builds/pw-${VERSION}.zip" | ||
CHECKSUM_FILE="public/builds/pw-${VERSION}.256" | ||
MANIFEST_FILE="public/manifest.json" | ||
|
||
# Step 1: Add changes to Git | ||
git add . | ||
|
||
# Step 2: Commit the changes | ||
git commit -m "Update version to $VERSION" | ||
|
||
# Step 3: Tag the new commit | ||
git tag "$VERSION" | ||
|
||
# Step 4: Push changes and tags to remote | ||
git push origin main --tags | ||
|
||
# Step 5: Gather commit messages since the last version update | ||
RELEASE_NOTES="Release $VERSION\n\nChangelog:\n" | ||
LAST_VERSION_UPDATE_COMMIT=$(git log --grep='Update version to' --format=format:"%H" | awk 'NR==2{print $1}') | ||
if [ -n "$LAST_VERSION_UPDATE_COMMIT" ]; then | ||
RELEASE_NOTES+=$(git log --pretty=format:"- %s" "${LAST_VERSION_UPDATE_COMMIT}..HEAD") | ||
else | ||
RELEASE_NOTES+="No previous version update found." | ||
fi | ||
|
||
# Step 6: Create a GitHub release draft | ||
gh release create "$VERSION" "$ZIP_FILE" --draft --title "Release $VERSION" --notes "$RELEASE_NOTES" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8bd7f25b8d214bc7ef025d3719ad91723447ca96087456c0ba6c02e3f40027c5 public/builds/pw-0.3.0-alpha.zip |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters