From bf93f7572f46ee8daf94c00e8b8fd31ce0782096 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Thu, 1 Apr 2021 02:23:43 -0400 Subject: [PATCH] convery release workflow to matrix --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 30 +++++++++--------------------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2732c7864..570a79cdc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: - pull_request jobs: - test: + ci: runs-on: ubuntu-latest strategy: matrix: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e3e25db5c..083107699 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,8 +6,13 @@ on: - master jobs: - latest: + release: runs-on: ubuntu-latest + strategy: + matrix: + channel: + - dev + - latest steps: - name: Checkout repo uses: actions/checkout@v2 @@ -28,6 +33,7 @@ jobs: # https://github.com/changesets/action - name: Create release pull request + if: matrix.channel == 'latest' uses: changesets/action@master with: publish: yarn changeset publish @@ -36,27 +42,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - dev: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Setup node - uses: actions/setup-node@v2 - with: - node-version: 12.x - registry-url: https://registry.npmjs.org - - - name: Install dependencies - run: yarn - - - name: Prepare release - run: yarn prerelease - + # 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