mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 10:29:48 +02:00
Update release workflow to make sure latest
job runs before dev
(#4274)
This commit is contained in:
24
.github/workflows/release.yml
vendored
24
.github/workflows/release.yml
vendored
@@ -6,14 +6,9 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
setup:
|
||||||
name: ${{ matrix.channel }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
channel:
|
|
||||||
- dev
|
|
||||||
- latest
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@@ -32,9 +27,13 @@ jobs:
|
|||||||
- name: Prepare release
|
- name: Prepare release
|
||||||
run: yarn prerelease
|
run: yarn prerelease
|
||||||
|
|
||||||
|
latest:
|
||||||
|
needs: setup
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
# https://github.com/changesets/action
|
# https://github.com/changesets/action
|
||||||
- name: Create release pull request
|
- name: Create release pull request or Publish to npm
|
||||||
if: matrix.channel == 'latest'
|
|
||||||
uses: changesets/action@master
|
uses: changesets/action@master
|
||||||
with:
|
with:
|
||||||
publish: yarn changeset publish
|
publish: yarn changeset publish
|
||||||
@@ -43,12 +42,17 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
NPM_TOKEN: ${{ secrets.NPM_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
|
# https://github.com/atlassian/changesets/blob/master/docs/snapshot-releases.md
|
||||||
- name: Release to @dev channel
|
- name: Release to @dev channel
|
||||||
if: matrix.channel == 'dev'
|
|
||||||
run: |
|
run: |
|
||||||
yarn changeset version --snapshot
|
yarn changeset version --snapshot
|
||||||
yarn changeset publish --tag dev
|
yarn changeset publish --tag dev
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
Reference in New Issue
Block a user