Skip to content

Commit

Permalink
added publish action share (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdlucas authored Jul 7, 2023
1 parent 348f83b commit fb802b7
Showing 1 changed file with 5 additions and 26 deletions.
31 changes: 5 additions & 26 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,8 @@ on:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
name: Publish to npm
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org/'
- name: Install
run: yarn install && yarn build
# Publish to npm
- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v1
with:
registry-url: 'https://npm.pkg.github.com'
scope: '@platformbuilders'
# Publish to GitHub Packages
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
call-workflow:
uses: platformbuilders/actions-workflows/.github/workflows/publish-lib.yml@main
secrets:
GITHUB_PACKAGES_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit fb802b7

Please sign in to comment.