Skip to content

Commit

Permalink
docs: update example workflow (#20)
Browse files Browse the repository at this point in the history
* docs: update example workflow

* Create clever-pears-tickle.md
  • Loading branch information
kotarella1110 committed Aug 8, 2023
1 parent 3634dca commit 7d63dc2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/clever-pears-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"pr-voyager": patch
---

docs: update example workflow
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 7d63dc2

Please sign in to comment.