diff --git a/.github/workflows/build-deb.sh b/.github/workflows/build-deb.sh index 6baa68e1..577ffb26 100755 --- a/.github/workflows/build-deb.sh +++ b/.github/workflows/build-deb.sh @@ -6,8 +6,8 @@ sudo apt-get update sudo apt-get install -y make # We set this here, so it's the same between the copydb and sharding debian -# package. -DATETIME=$(date -u +%Y%m%d%H%M%S) +# package, and between different arch builds +DATETIME=$(date -u +%Y%m%d) git status @@ -15,16 +15,11 @@ make copydb-deb DATETIME=${DATETIME} make sharding-deb DATETIME=${DATETIME} cd build -sha256sum *.deb > ghostferry-$GITHUB_SHA.sha256sum - set +x echo "Debian package built successfully as follows:" ls -l ghostferry* -echo "sha256sum:" -cat ghostferry-$GITHUB_SHA.sha256sum - # Make sure the we didn't release a dirty build by accident if ls | grep -q dirty; then echo "ERROR: source directory is not clean! refused to release. showing git status below:" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 71a81477..41bb2c70 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -93,3 +93,23 @@ jobs: with: name: debs path: build/ghostferry* + + checksum-debs: + runs-on: ubuntu-latest + needs: build-debs + steps: + - name: Fetch uploaded artifacts + uses: actions/download-artifact@v3 + with: + name: debs + - name: shasum + shell: bash + run: | + sha256sum *.deb > ghostferry-$GITHUB_SHA.sha256sum + echo "sha256sum:" + cat ghostferry-$GITHUB_SHA.sha256sum + - name: Upload checksum + uses: actions/upload-artifact@v3 + with: + name: debs + path: "*.sha256sum"