ci: enable npm provenance (#882)

This commit is contained in:
Superchupu
2024-03-04 19:04:22 +00:00
committed by GitHub
parent 5e295706b8
commit abbd4b2e21
3 changed files with 7 additions and 0 deletions

View File

@@ -65,6 +65,8 @@ jobs:
create_release:
name: Create release and publish
runs-on: ubuntu-latest
permissions:
id-token: write
if: github.repository_owner == 'discordjs' && github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(release)') && !contains(github.event.head_commit.message, '[skip ci]')
steps:

View File

@@ -10,6 +10,8 @@ jobs:
publish:
name: Publish @next release to npm
runs-on: ubuntu-latest
permissions:
id-token: write
if: github.repository_owner == 'discordjs' && !(github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(release)'))
steps:
- name: Cancel previous publish attempts

View File

@@ -157,6 +157,9 @@
"tsutils": "^3.21.0",
"typescript": "^4.9.5"
},
"publishConfig": {
"provenance": true
},
"repository": {
"type": "git",
"url": "https://github.com/discordjs/discord-api-types"