From b4204f3be4e8ee640b088694201fbe28deb0541e Mon Sep 17 00:00:00 2001 From: rocketraccoon Date: Mon, 4 Aug 2025 15:24:10 +0700 Subject: [PATCH] feat(testing-library): add release workflow --- .github/workflows/release.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..694f601 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +name: release-please + +on: + push: + branches: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: self-hosted-arc + outputs: + release_created: ${{ steps.release.outputs.release_created }} + steps: + - uses: googleapis/release-please-action@v4 + id: release + with: + token: ${{ secrets.GH_ACCESS_TOKEN }} + release-type: node + config-file: release-please-config.json + + publish: + needs: release-please + if: ${{ needs.release-please.outputs.release_created }} + runs-on: self-hosted-arc + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: "22" + registry-url: "https://registry.npmjs.org" + cache: "npm" + + - run: npm ci + + - run: npm run build + + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}