diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 85933b2..95f35e4 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -34,7 +34,7 @@ jobs: - name: '计算工件名' shell: bash run: echo "ARTIFACT_NAME=dontcrack-openharmony-linux-kernel-docker-image-${GITHUB_REF_NAME//\//-}" >> "$GITHUB_ENV" - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: ${{ env.ARTIFACT_NAME }} path: 'dontcrack-openharmony-linux-kernel-image.tar.gz' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a8a0029..d7a9d9f 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 @@ -26,7 +24,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 @@ -40,7 +38,7 @@ jobs: else tar czf ../dontcrack-openharmony-linux-kernel-${{ matrix.target }}.tar.gz dontcrack-openharmony-linux-kernel fi - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: 'dontcrack-openharmony-linux-kernel-${{ matrix.target }}' path: '${{ github.workspace }}/dontcrack-openharmony-linux-kernel-${{ matrix.target }}.*' @@ -64,19 +62,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