github.com/Mrs4s/go-cqhttp@v1.2.0/scripts/upload_dist.sh (about) 1 #!/bin/bash 2 3 if [ "$GITHUB_ACTIONS" != "true" ]; then 4 echo "This script is only meant to be run in GitHub Actions." 5 exit 1 6 fi 7 8 cp -f dist/*.tar.gz upstream/dist/downloads 9 cp -f dist/*.zip upstream/dist/downloads 10 cd upstream/dist || exit 11 LATEST_VERSION="${GITHUB_REF#"refs/tags/"}" 12 git config --local user.name 'Github Actions' 13 git config --local user.email 'github-actions@users.noreply.github.com' 14 git add --all 15 git commit -m "update to $LATEST_VERSION" 16 git tag -d "$LATEST_VERSION" 17 git tag "$LATEST_VERSION" 18 git push 19 git push --tags