Skip to content

Commit

Permalink
ci: publish with provenance (#1007)
Browse files Browse the repository at this point in the history
Will publish `auth-js` and `gotrue-js` with
[provenance](https://docs.npmjs.com/generating-provenance-statements).
  • Loading branch information
hf authored Dec 26, 2024
1 parent 1225239 commit 14eb711
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
release_please:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
steps:
Expand Down Expand Up @@ -102,16 +103,17 @@ jobs:
echo "Publishing auth-js now..."
npm publish --tag "$DIST_TAG"
npm publish --provenance --tag "$DIST_TAG"
echo "Publishing gotrue-js now..."
for f in package.json package-lock.json
do
sed -i 's|\(["/]\)auth-js|\1gotrue-js|g' "$f"
# only replace name not repository, homepage, etc.
sed -i 's|\("name":[[:space:]]*"@supabase/\)auth-js|\1gotrue-js|g' "$f"
done
npm publish --tag "$DIST_TAG"
npm publish --provenance --tag "$DIST_TAG"
- name: Create GitHub release and branches
if: ${{ steps.release.outputs.release_created == 'true' || steps.release.outputs.prs_created == 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"main": "dist/main/index.js",
"module": "dist/module/index.js",
"types": "dist/module/index.d.ts",
"repository": "supabase/auth-js",
"repository": "github:supabase/auth-js",
"scripts": {
"clean": "rimraf dist docs",
"coverage": "echo \"run npm test\"",
Expand Down

0 comments on commit 14eb711

Please sign in to comment.