mirror of
https://github.com/oneclickvirt/backtrace.git
synced 2025-02-23 01:15:40 +08:00
update
This commit is contained in:
parent
2c053e718b
commit
e2466cf330
24
.github/workflows/main.yaml
vendored
24
.github/workflows/main.yaml
vendored
@ -9,21 +9,6 @@ on:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
delete-assets:
|
||||
name: Delete Existing Release Assets
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'release'
|
||||
steps:
|
||||
- name: Delete Existing Release Assets
|
||||
run: |
|
||||
release_id=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/oneclickvirt/backtrace/releases/tags/output" | jq -r '.id')
|
||||
echo "Deleting existing release assets..."
|
||||
assets=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/oneclickvirt/backtrace/releases/$release_id/assets" | jq -r '.[] | .id')
|
||||
for asset in $assets; do
|
||||
echo "Deleting asset with ID: $asset"
|
||||
curl -X DELETE -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/oneclickvirt/backtrace/releases/assets/$asset"
|
||||
done
|
||||
|
||||
build:
|
||||
name: Build and Test
|
||||
runs-on: ubuntu-latest
|
||||
@ -41,6 +26,15 @@ jobs:
|
||||
run: |
|
||||
go build -v ./...
|
||||
go test -v ./...
|
||||
- name: Delete Existing Release Assets
|
||||
run: |
|
||||
release_id=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/oneclickvirt/backtrace/releases/tags/output" | jq -r '.id')
|
||||
echo "Deleting existing release assets..."
|
||||
assets=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/oneclickvirt/backtrace/releases/$release_id/assets" | jq -r '.[] | .id')
|
||||
for asset in $assets; do
|
||||
echo "Deleting asset with ID: $asset"
|
||||
curl -X DELETE -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/oneclickvirt/backtrace/releases/assets/$asset"
|
||||
done
|
||||
|
||||
release-binary:
|
||||
name: Release Go Binary
|
||||
|
Loading…
Reference in New Issue
Block a user