Skip to content

Commit 6a8b8da

Browse files
committed
package and checks permissions
1 parent e4d109b commit 6a8b8da

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ on:
77
- "v*.*.*-*"
88

99
permissions:
10+
checks: write
1011
contents: read
1112
packages: write
13+
pull-requests: read
1214

1315
jobs:
1416
test:
1517
uses: "./.github/workflows/test.yaml"
1618
publish:
1719
runs-on: ubuntu-latest
20+
needs:
21+
- test
1822
steps:
1923
- name: Checkout source
2024
uses: actions/checkout@v4
@@ -35,4 +39,4 @@ jobs:
3539
- name: Publish to GitHub packages
3640
run: npm publish
3741
env:
38-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
name: RunTests
22
on:
33
push:
4-
branches: ['main', 'develop']
4+
branches:
5+
- main
6+
- develop
7+
- feat/*
58
pull_request:
69
branches: ['main']
710
types: [opened, reopened, edited]
811
workflow_call:
912

13+
permissions:
14+
checks: write
15+
contents: read
16+
pull-requests: read
17+
1018
jobs:
1119
RunTestSuite:
1220
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}

.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@wfp:registry=https://npm.pkg.github.com
2-
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
2+
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}

0 commit comments

Comments
 (0)