Skip to content

Commit

Permalink
feat: update publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelxsilva committed May 6, 2024
1 parent ff2e255 commit 0a90d3d
Showing 1 changed file with 5 additions and 28 deletions.
33 changes: 5 additions & 28 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,8 @@ on:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
name: Publish to npm
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: 'https://registry.npmjs.org/'
# Setup .npmrc file to publish to GitHub Packages
- name: Set NPM Variables
run: echo "$PACKAGES_NPMRC" > .npmrc
env:
PACKAGES_NPMRC: ${{ secrets.PACKAGES_NPMRC }}
- name: Install
run: yarn
- name: Build
run: yarn build

- uses: actions/setup-node@v1
with:
node-version: 16
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 0a90d3d

Please sign in to comment.