Skip to content

Commit

Permalink
feat(security): Add provenance (#408)
Browse files Browse the repository at this point in the history
* Enable provenance in package.json

* Add necessary permissions to the release workflow

* Adapt for sub-packages

* style: prettier

---------

Co-authored-by: wolfy1339 <webmaster@wolfy1339.com>
  • Loading branch information
AaronDewes and wolfy1339 authored Apr 3, 2024
1 parent f2fe6f7 commit fcadeff
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ name: Release
- next
- beta
- "*.x"
# These are recommended by the semantic-release docs: https://github.com/semantic-release/npm#npm-provenance
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance

jobs:
release:
name: release
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"name": "@octokit/openapi-types",
"publishConfig": {
"access": "public"
},
"private": true,
"version": "0.0.0-development",
"description": "Generated TypeScript definitions based on GitHub's OpenAPI spec for https://api.github.com",
"repository": "github:octokit/openapi-types.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-types-ghec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/openapi-types-ghec"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"main": "",
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-types-ghes-3.10/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/openapi-types-ghes-3.10"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"main": "",
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-types-ghes-3.11/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/openapi-types-ghes-3.11"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"main": "",
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-types-ghes-3.12/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/openapi-types-ghes-3.12"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"main": "",
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-types-ghes-3.9/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/openapi-types-ghes-3.9"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"main": "",
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-types-github.ae/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/openapi-types-github.ae"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"main": "",
Expand Down
3 changes: 2 additions & 1 deletion packages/openapi-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"directory": "packages/openapi-types"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"version": "0.0.0-development",
"main": "",
Expand Down
1 change: 1 addition & 0 deletions scripts/generate-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ run();
const packageDefaults = {
publishConfig: {
access: "public",
provenance: true,
},
version: "0.0.0-development",
main: "",
Expand Down

0 comments on commit fcadeff

Please sign in to comment.