diff --git a/.github/workflows/github-actions.yml b/.github/workflows/checks.yml similarity index 100% rename from .github/workflows/github-actions.yml rename to .github/workflows/checks.yml diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml new file mode 100644 index 0000000..b96224e --- /dev/null +++ b/.github/workflows/publish-package.yml @@ -0,0 +1,27 @@ +name: Publish Package to NPM +on: + release: + types: [published] + jobs: + build: + runs-on: [self-hosted] + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ github.event.release.target_commitish }} + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: "18" + registry-url: "https://registry.npmjs.org" + - name: Install dependencies + run: npm ci + - name: Build + run: npm run build + - name: Update package version + run: npm version ${{ github.event.release.tag_name }} + - name: Publish Package on NPM + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}