diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 5fd0b35..330a741 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -16,7 +16,7 @@ jobs: docker-build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: 'Go 单元测试' uses: actions/setup-go@v5 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cdea7ce..fcc8ddc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,8 +4,6 @@ on: push: tags: - 'v*' - release: - types: [published, released] permissions: contents: write @@ -25,10 +23,10 @@ jobs: - { target: windows-amd64, goos: windows, goarch: amd64, ext: .exe } - { target: windows-arm64, goos: windows, goarch: arm64, ext: .exe } steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - uses: actions/setup-go@v5 with: - go-version: '1.26' + go-version: '1.25' - name: '编译 ${{ matrix.target }}' run: | mkdir -p dist @@ -66,19 +64,9 @@ jobs: *.tar.gz|*.zip) cp "$f" release/ ;; esac done - - name: '生成 MD5/SHA1 校验文件' - run: | - set -euo pipefail - cd release - find . -type f ! -name 'checksums-md5.txt' ! -name 'checksums-sha1.txt' -print0 \ - | sort -z | xargs -0 -r md5sum > checksums-md5.txt - find . -type f ! -name 'checksums-md5.txt' ! -name 'checksums-sha1.txt' -print0 \ - | sort -z | xargs -0 -r sha1sum > checksums-sha1.txt - name: '上传到 Release' - if: github.event_name != 'workflow_dispatch' || github.event.inputs.tag != '' uses: softprops/action-gh-release@v2 with: - tag_name: ${{ github.event.inputs.tag || github.event.release.tag_name || github.ref_name }} files: 'release/*' generate_release_notes: true fail_on_unmatched_files: false