Skip to content

Commit

Permalink
fix: give github publish permission and add package scope
Browse files Browse the repository at this point in the history
  • Loading branch information
yukun-han committed Apr 6, 2024
1 parent 385189a commit 5830663
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
- "!.github/workflows/**"

jobs:
build:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/publish-github-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ on:
types: [published]

jobs:
build:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -22,6 +25,7 @@ jobs:
node-version-file: ".nvmrc"
cache: pnpm
registry-url: https://npm.pkg.github.com
scope: "@yukun-han"

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
types: [published]

jobs:
build:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "selectable-response",
"name": "@yukun-han/selectable-response",
"version": "0.1.2",
"description": "Customized variant handlers for Mocks Server to return response by selectors.",
"type": "module",
Expand Down

0 comments on commit 5830663

Please sign in to comment.