diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5ff9470..e483ff2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,19 +1,22 @@ -name: publish +name: Publish the Package + on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+*' + - v* + jobs: - build: + publish: runs-on: ubuntu-latest + steps: - name: Checkout uses: actions/checkout@v3 - - name: Setup NodeJS + - name: Setup Publishing to NPMJS uses: actions/setup-node@v3 with: - node-version: '18.x' + node-version: '20.x' registry-url: 'https://registry.npmjs.org' - name: Install dependencies @@ -22,7 +25,17 @@ jobs: - name: Build run: npm run build - - name: Publish + - name: Publish on NPM run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Setup Publishing to Github Packages + uses: actions/setup-node@v4 + with: + registry-url: 'https://npm.pkg.github.com' + + - name: Publish on Github + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.REPO_TOKEN }}