mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-04 19:17:37 +08:00
19 lines
564 B
Bash
19 lines
564 B
Bash
#!/bin/bash
|
|
|
|
if [ "$GITHUB_ACTIONS" != "true" ]; then
|
|
echo "This script is only meant to be run in GitHub Actions."
|
|
exit 1
|
|
fi
|
|
|
|
cp -f dist/*.tar.gz upstream/dist/downloads
|
|
cp -f dist/*.zip upstream/dist/downloads
|
|
cd upstream/dist || exit
|
|
LATEST_VERSION="${GITHUB_REF#"refs/tags/"}"
|
|
git config --local user.name 'Github Actions'
|
|
git config --local user.email 'github-actions@users.noreply.github.com'
|
|
git add --all
|
|
git commit -m "update to $LATEST_VERSION"
|
|
git tag -d "${GITHUB_REF#"refs/tags/"}"
|
|
git tag "${GITHUB_REF#"refs/tags/"}"
|
|
git push
|
|
git push --tags |