chore(ci): try to upload checksums
@@ -120,6 +120,17 @@ jobs:
cp ./.github/actions/publish_binary/databend-release-readme.txt release/${target}/readme.txt
cp -r ./.github/actions/publish_binary/databend-scripts-for-release release/${target}/scripts
gtar -C ./release/${target} -czvf databend-${version}-${target}.tar.gz bin configs scripts readme.txt
+ - name: generate sha256sums
+ run: |
+ target=${{ steps.target.outputs.target }}
+ version=${{ needs.create_release.outputs.version }}
+ sha256sum databend-${version}-${target}.tar.gz >> sha256-${version}-${target}.txt
+ - name: post sha256
+ uses: actions/upload-artifact@v2
+ with:
+ name: sha256sums
+ path: sha256-${{ needs.create_release.outputs.version }}-${{ steps.target.outputs.target }}.txt
+ retention-days: 1
- name: Publish Binaries
uses: ./.github/actions/publish_binary
with:
@@ -183,6 +194,17 @@ jobs:
cp ./.github/actions/publish_binary/databend-release-readme.txt release/${target}/readme.txt
cp -r ./.github/actions/publish_binary/databend-scripts-for-release release/${target}/scripts
tar -C ./release/${target} -czvf databend-${version}-${target}.tar.gz bin configs scripts readme.txt
+ - name: generate sha256sums
+ run: |
+ target=${{ steps.target.outputs.target }}
+ version=${{ needs.create_release.outputs.version }}
+ sha256sum databend-${version}-${target}.tar.gz >> sha256-${version}-${target}.txt
+ - name: post sha256
+ uses: actions/upload-artifact@v2
+ with:
+ name: sha256sums
+ path: sha256-${{ needs.create_release.outputs.version }}-${{ steps.target.outputs.target }}.txt
+ retention-days: 1
- name: Publish Binaries
uses: ./.github/actions/publish_binary
with:
@@ -329,3 +351,31 @@ jobs:
context: .
file: ./docker/${{ matrix.distro }}/${{ matrix.service }}.Dockerfile
build-args: VERSION=${{ needs.create_release.outputs.version }}
+
+ upload-sha256sums-plugin:
+ needs: [create_release, publish_linux, publish_macos]
+ runs-on: ubuntu-latest
+ name: upload-sha256sums
+ steps:
+ - name: checkout
+ uses: actions/checkout@v2
+ - name: Get release
+ id: get_release
+ uses: bruceadams/get-release@v1.2.2
+ - name: download sha256sums
+ uses: actions/download-artifact@v2
+ with:
+ name: sha256sums
+ - shell: bash
+ run: |
+ for file in *.txt
+ do
+ cat ${file} >> sha256sums.txt
+ done
+ - name: upload checksums
+ uses: actions/upload-release-asset@v1.0.2
+ with:
+ upload_url: ${{ steps.get_release.outputs.upload_url }}
+ asset_path: sha256sums.txt
+ asset_name: sha256sums.txt
+ asset_content_type: text/plain
