diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee98b06..fd61dbf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,17 +1,31 @@ name: Default CI on: push: - branches: - - master + branches: [master] pull_request: branches: - '**' jobs: + get-next-version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - run: npm ci + - run: npx semantic-release --dry-run + id: get-next-version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + outputs: + new-release-published: ${{ steps.get-next-version.outputs.new-release-published }} + new-release-version: ${{ steps.get-next-version.outputs.new-release-version }} tests: runs-on: ubuntu-latest strategy: matrix: - node: [16, 18] + node: [16] steps: - name: Checkout uses: actions/checkout@v3 @@ -21,13 +35,6 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - name: Semantic Release - run: npx semantic-release --dry-run - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - outputs: - new-release-published: ${{ steps.get-next-version.outputs.new-release-published }} - new-release-version: ${{ steps.get-next-version.outputs.new-release-version }} - name: Install dependencies run: npm ci - name: Validate package-lock.json changes