diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 299049f..a93e901 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -36,7 +36,7 @@ jobs: - name: '计算工件名' shell: bash run: echo "ARTIFACT_NAME=simple-time-service-docker-image-${GITHUB_REF_NAME//\//-}" >> "$GITHUB_ENV" - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: ${{ env.ARTIFACT_NAME }} path: 'simple-time-service-image.tar.gz' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94ebc02..ee1e50c 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 @@ -28,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.26' + go-version: '1.25' - name: '编译 ${{ matrix.target }}' run: | mkdir -p dist @@ -42,7 +40,7 @@ jobs: else tar czf ../simple-time-service-${{ matrix.target }}.tar.gz simple-time-service fi - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: 'simple-time-service-${{ matrix.target }}' path: '${{ github.workspace }}/simple-time-service-${{ matrix.target }}.*' @@ -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