Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
working-directory: client-next
- run: npm run build
working-directory: client-next
- run: bash scripts/test-release-checksums.sh
release:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: regression
Expand Down Expand Up @@ -60,7 +61,7 @@ jobs:
fi
mkdir -p release-artifacts
npm pack ./server --ignore-scripts --pack-destination release-artifacts
sha256sum release-artifacts/*.tgz > release-artifacts/SHA256SUMS
bash scripts/write-release-checksums.sh release-artifacts
printf '%s\n' 'See CHANGELOG.md and docs/OPENCODE-V2-COMPATIBILITY.md for changes and limitations.' 'The attached archive is the tested server package. npm publication is a separate step; verify the registry before claiming it is published.' > release-artifacts/notes.md
gh release create "$TAG" release-artifacts/*.tgz release-artifacts/SHA256SUMS --target "$GITHUB_SHA" --title "$TAG" --notes-file release-artifacts/notes.md
- name: Publish npm when an existing token is configured
Expand Down
8 changes: 8 additions & 0 deletions scripts/test-release-checksums.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT
printf 'synthetic package\n' > "$tmp/package.tgz"
sh "$root/scripts/write-release-checksums.sh" "$tmp"
(cd "$tmp" && sha256sum -c SHA256SUMS)
4 changes: 4 additions & 0 deletions scripts/write-release-checksums.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
set -eu
cd "$1"
sha256sum -- *.tgz > SHA256SUMS
Loading