Skip to content

Commit ff28b3a

Browse files
fix(ci): release github action needs correct github token permissions
1 parent 20bd74d commit ff28b3a

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

.github/workflows/build.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14+
- name: 'Retrieve Secrets from Vault'
15+
id: vault
16+
uses: hashicorp/[email protected]
17+
with:
18+
url: ${{ secrets.VAULT_URL }}
19+
role: ${{ github.event.repository.name }}-github-action
20+
method: jwt
21+
path: github-actions
22+
exportEnv: false
23+
secrets: |
24+
github/token/${{ github.event.repository.name }}-semantic-release token | GITHUB_TOKEN_FROM_VAULT;
25+
1426
- name: Checkout code
1527
uses: actions/checkout@v5
1628

.github/workflows/release.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ jobs:
6262
dist
6363
key: build-cache-${{ github.run_id }}-${{ github.run_attempt }}
6464

65+
- name: Setup Chrome
66+
uses: browser-actions/setup-chrome@v2
67+
with:
68+
install-chromedriver: true
69+
6570
- name: Run semantic release
6671
run: npm run semantic-release
6772
env:
68-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_TOKEN }}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"type": "module",
77
"exports": {
88
".": {
9+
"types": "./dist/types/index.d.ts",
910
"import": "./dist/esm/index.js",
10-
"require": "./dist/contentful.cjs",
11-
"types": "./dist/types/index.d.ts"
11+
"require": "./dist/contentful.cjs"
1212
}
1313
},
1414
"main": "./dist/esm/index.js",

0 commit comments

Comments
 (0)