1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-30 18:39:51 +02:00

Update release workflow to make sure latest job runs before dev (#4274)

This commit is contained in:
Claudéric Demers
2021-05-26 08:56:17 -04:00
committed by GitHub
parent 1ef84f4d48
commit c7ff274a68

View File

@@ -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 }}