From 0a90d3d5067d13b4d2b393715671869d5c2534ed Mon Sep 17 00:00:00 2001 From: marcelxsilva Date: Mon, 6 May 2024 09:05:20 -0300 Subject: [PATCH] feat: update publish workflow --- .github/workflows/publish.yml | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 568a2cf..ba40ca1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 }}