diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d88da98..84dfe1d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,9 @@ name: Publish Package to npmjs + on: release: types: [published] + jobs: build: runs-on: ubuntu-latest @@ -9,13 +11,22 @@ jobs: contents: read id-token: write steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 with: node-version: '20.x' registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm run build - - run: npm publish --provenance --access public + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Publish package + run: npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NODE_TOKEN }}