1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 03:23:49 +08:00

update tag

This commit is contained in:
wdvxdr 2021-03-27 12:54:35 +08:00
parent 4aeba55550
commit 2e4248e40e
No known key found for this signature in database
GPG Key ID: 55FF1414A69CEBA6
2 changed files with 20 additions and 10 deletions

View File

@ -36,13 +36,4 @@ jobs:
path: upstream/dist
- name: Update Dist
run: |
cp dist/*.tar.gz upstream/dist/
cp dist/*.zip upstream/dist/
cd upstream/dist
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 ${GITHUB_REF#"refs/tags/"}"
git push
run: ./scripts/upload_dist.sh

19
scripts/upload_dist.sh Normal file
View File

@ -0,0 +1,19 @@
#!/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/
cp -f dist/*.zip upstream/dist/
cd upstream/dist
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