Skip to content

Commit

Permalink
docs: update example workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kotarella1110 committed Aug 8, 2023
1 parent 3634dca commit aff37d8
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,30 +45,31 @@ jobs:
pr-release:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
- name: Checkout
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
# Uncomment this if you're using pnpm
# - name: Install pnpm
# uses: pnpm/action-setup@v2
# with:
# version: 8

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
cache: npm # or pnpm

- name: Install Dependencies
run: pnpm install
run: npm ci # or pnpm install

- name: Build
run: pnpm build
run: npm build # or pnpm build

- name: Publish to npm
- name: Publish
uses: kotarella1110/pr-voyager@v0
with:
publish: pnpm publish -r
publish: npm publish # or pnpm publish -r
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -81,15 +82,16 @@ However, if you already have an `.npmrc` file in your repository, the GitHub Act
For instance, if you want to manually create the `.npmrc` file before running the GitHub Action, you can add a step like this:

```diff
+ - name: Creating .npmrc
+ - name: Create .npmrc
+ run: |
+ echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> $HOME/.npmrc
+ env:
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to npm
+
- name: Publish
uses: kotarella1110/pr-voyager
with:
publish: pnpm publish -r
publish: npm publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down

0 comments on commit aff37d8

Please sign in to comment.