diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32393aa..f5f6d39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,38 +7,37 @@ on: branches: - '**' jobs: - tests: + get-next-version: runs-on: ubuntu-latest - strategy: - matrix: - node: [16, 18] steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Setup Nodejs - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node }} - - name: Install dependencies - run: npm ci - - name: Validate package-lock.json changes - run: make validate-no-uncommitted-package-lock-changes - - name: Lint - run: npm run lint - - name: Test - run: npm run test - - name: Build - run: npm run build - - name: i18n_extract - run: npm run i18n_extract - - name: Coverage - uses: codecov/codecov-action@v3 - run: npx semantic-release --dry-run + - 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 }} \ No newline at end of file + new-release-version: ${{ steps.get-next-version.outputs.new-release-version }} + build: + runs-on: ubuntu-latest + needs: next-version + if: needs.get-next-version.outputs.new-release-published == 'true' + steps: + - uses: actions/checkout@v3 + - run: echo "The new release version is ${{ needs.get-next-version.outputs.new-release-version }}" + release: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm ci + - run: npx semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file