diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0e4ef65..e51424e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,19 +10,37 @@ on: branches: ['main'] jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Publish - uses: actions/setup-node@v3 - with: - node-version: 18.x - cache: 'npm' - - name: CI setup - run: yarn ci - - name: Publish to NPM - run: yarn run semantic-release - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: CI checkout + uses: actions/setup-node@v3 + with: + node-version: 18.x + cache: 'npm' + - name: CI setup + run: yarn ci + - name: CI build + run: yarn build + - name: Run tests + run: yarn test + publish: + runs-on: ubuntu-latest + needs: ci + steps: + - uses: actions/checkout@v3 + - name: Publish checkout + uses: actions/setup-node@v3 + with: + node-version: 18.x + cache: 'npm' + - name: Publish setup + run: yarn ci + - name: Publish build + run: yarn build + - name: Publish to NPM + run: yarn run semantic-release + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}