From c7ff274a689409f5d387b3c8f6eabfaa16a10650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Claud=C3=A9ric=20Demers?= Date: Wed, 26 May 2021 08:56:17 -0400 Subject: [PATCH] Update release workflow to make sure `latest` job runs before `dev` (#4274) --- .github/workflows/release.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e51cd9268..b8c69dbbd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,14 +6,9 @@ on: - main jobs: - release: - name: ${{ matrix.channel }} + setup: runs-on: ubuntu-latest - strategy: - matrix: - channel: - - dev - - latest + steps: - name: Checkout repo uses: actions/checkout@v2 @@ -32,9 +27,13 @@ jobs: - name: Prepare release run: yarn prerelease + latest: + needs: setup + runs-on: ubuntu-latest + + steps: # https://github.com/changesets/action - - name: Create release pull request - if: matrix.channel == 'latest' + - name: Create release pull request or Publish to npm uses: changesets/action@master with: publish: yarn changeset publish @@ -43,12 +42,17 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + dev: + needs: latest + runs-on: ubuntu-latest + + steps: # https://github.com/atlassian/changesets/blob/master/docs/snapshot-releases.md - name: Release to @dev channel - if: matrix.channel == 'dev' run: | yarn changeset version --snapshot yarn changeset publish --tag dev env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}