Skip to content

Commit

Permalink
Merge pull request #244 from vordgi/rd-7
Browse files Browse the repository at this point in the history
rd-7 configure workflow
  • Loading branch information
vordgi authored Oct 1, 2024
2 parents b654f18 + 1a29347 commit a070fe5
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish package

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Install dependencies and build
run: |
pnpm install
pnpm run build
cp ../../README.md .
cp ../../LICENSE .
working-directory: ./packages/robindoc

- name: Publish on main
if: "!contains(github.ref_name, 'canary')"
run: |
npm set //registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}
npm publish --access public
working-directory: ./packages/robindoc

- name: Publish on canary
if: contains(github.ref_name, 'canary')
run: |
npm set //registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}
npm version --no-git-tag-version ${{github.ref_name}}
npm publish --tag canary --access public
working-directory: ./packages/robindoc
2 changes: 1 addition & 1 deletion packages/robindoc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "robindoc",
"version": "0.0.1",
"version": "1.0.0",
"description": "",
"main": "./lib/index.js",
"scripts": {
Expand Down

0 comments on commit a070fe5

Please sign in to comment.