mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 03:23:49 +08:00
upload dist
This commit is contained in:
parent
2b3842e61c
commit
76d00a57ff
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
@ -9,14 +9,12 @@ jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.3.4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
-
|
||||
name: Set up Go
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.16.2'
|
||||
@ -28,3 +26,16 @@ jobs:
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Checkout Dist
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'gocq/dist'
|
||||
ref: master
|
||||
ssh-key: ${{ secrets.SSH_KEY }}
|
||||
path: upstream/dist
|
||||
|
||||
- name: Update Dist
|
||||
run: |
|
||||
chmod +x scripts/upload_dist.sh
|
||||
./scripts/upload_dist.sh
|
||||
|
@ -16,6 +16,8 @@ builds:
|
||||
- amd64
|
||||
- arm
|
||||
- arm64
|
||||
goarm:
|
||||
- 7
|
||||
ignore:
|
||||
- goos: darwin
|
||||
goarch: arm
|
||||
|
19
scripts/upload_dist.sh
Normal file
19
scripts/upload_dist.sh
Normal 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/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
|
Loading…
x
Reference in New Issue
Block a user