From 3d1fe12c3990339b5fe41b11903365b942e2eea9 Mon Sep 17 00:00:00 2001 From: Thatchapon Unprasert Date: Sat, 9 Nov 2024 12:10:17 +0700 Subject: [PATCH] ci: Add semantic-release test workflow (#464) * ci: Add semantic-release test to validate-pr workflow --- .github/workflows/validate-semantic.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/validate-semantic.yml diff --git a/.github/workflows/validate-semantic.yml b/.github/workflows/validate-semantic.yml new file mode 100644 index 0000000..29eeaad --- /dev/null +++ b/.github/workflows/validate-semantic.yml @@ -0,0 +1,24 @@ +name: Validate semantic release + +on: [pull_request] + +jobs: + run: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20.x, 22.x] + env: + CI: true + GH_TOKEN: ${{ secrets.GH_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install --frozen-lockfile + - run: | + GITHUB_REF=${{ github.head_ref }} + yarn semantic-release --no-ci --dry-run --branches ${{ github.head_ref }}