Skip to content

Commit

Permalink
bugFix:修复下载测速
Browse files Browse the repository at this point in the history
  • Loading branch information
sinspired committed Sep 21, 2024
1 parent 42723e1 commit b3a4f90
Showing 1 changed file with 34 additions and 18 deletions.
52 changes: 34 additions & 18 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,62 @@ on:
- 'v*'

jobs:

build:
build-release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: '1.22'

- name: Install dependencies
run: |
go mod tidy
run: go mod tidy

- name: Build for Windows
env:
GOOS: windows
GOARCH: amd64
run: |
go build -o bestiptest.exe
run: go build -o speedtest.exe

- name: Get tag description
id: tag_description
run: |
TAG_DESCRIPTION=$(git tag -l --format='%(contents)' ${{ github.ref_name }})
echo "tag_description=${TAG_DESCRIPTION}" >> $GITHUB_ENV
- name: Get latest commit message
id: commit_message
run: |
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
echo "commit_message=${COMMIT_MESSAGE}" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
release_name: "${{ github.ref_name }} ${{ env.tag_description }}"
# body: |
# ${{ github.action }} :${{ env.commit_message }}
draft: false
prerelease: false

- name: Upload Windows Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bestiptest.exe
asset_name: bestiptest.exe
asset_content_type: application/vnd.microsoft.portable-executable
asset_path: ./speedtest.exe
asset_name: speedtest.exe
asset_content_type: application/vnd.microsoft.portable-executable




0 comments on commit b3a4f90

Please sign in to comment.