diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dc68fa7..2be9a78 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,7 @@ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages -name: Node.js Package +name: Publish Node.js Package on: release: @@ -17,7 +17,9 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 16 - - run: npm ci + - run: | + npm ci + npm run build publish-npm: needs: build @@ -33,3 +35,18 @@ jobs: - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + publish-github: + needs: build + runs-on: ubuntu-latest + environment: GitHub + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://npm.pkg.github.com + - run: npm ci + - name: Publish to GitHub Packages + run: npm publish --registry=https://npm.pkg.github.com/ + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml index 0a991a1..442f909 100644 --- a/.github/workflows/webpack.yml +++ b/.github/workflows/webpack.yml @@ -1,4 +1,4 @@ -name: NodeJS with Webpack +name: Build on: push: @@ -26,9 +26,3 @@ jobs: run: | npm ci npm run build - - name: Upload a Build Artifact - uses: actions/upload-artifact@v3.1.2 - with: - # Artifact name - name: Node ${{ matrix.node-version }} - path: ./dist