Skip to content

Commit

Permalink
Merge pull request #13 from vordgi/get-9
Browse files Browse the repository at this point in the history
get-9 update package structure
  • Loading branch information
vordgi authored Feb 18, 2024
2 parents 4320631 + 5639b0d commit bff4abe
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 10 deletions.
41 changes: 31 additions & 10 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,37 @@ on:
types: [created]

jobs:
publish-npm:
publish:
runs-on: ubuntu-latest

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

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18.17.1
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
node-version: '20'

- name: Install dependencies and build
run: |
npm ci
npm run build
cp ../README.md .
cp ../LICENSE .
working-directory: ./package

- 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: ./package

- 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: ./package
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit bff4abe

Please sign in to comment.