mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Use split publishing workflow (#679)
* fix release line timing * Use split publishing workflow * remove release check, handle through publish plan * remove unused script * remove unused publish plan output * fmt * update a thing * fmt * simplify * update pre * update changesets cli
This commit is contained in:
@@ -15,13 +15,38 @@ concurrency:
|
||||
permissions: {} # each job should define its own permission explicitly
|
||||
|
||||
jobs:
|
||||
select-mode:
|
||||
name: Select mode
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
outputs:
|
||||
mode: ${{ steps.select-mode.outputs.mode }}
|
||||
permissions:
|
||||
contents: read # to check out repo (actions/checkout)
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: ./.github/actions/ci-setup
|
||||
with:
|
||||
skip-cache: true # avoid cache poisoning attacks
|
||||
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
|
||||
- name: Select mode
|
||||
id: select-mode
|
||||
uses: ./select-mode
|
||||
|
||||
version:
|
||||
name: Version
|
||||
if: needs.select-mode.outputs.mode == 'version'
|
||||
needs: select-mode
|
||||
runs-on: ubuntu-latest
|
||||
environment: version
|
||||
timeout-minutes: 20
|
||||
outputs:
|
||||
hasChangesets: ${{ steps.changesets.outputs.hasChangesets }}
|
||||
permissions:
|
||||
contents: read # to check out repo (actions/checkout)
|
||||
steps:
|
||||
@@ -47,15 +72,15 @@ jobs:
|
||||
|
||||
- name: Create or update release pull request
|
||||
id: changesets
|
||||
uses: ./
|
||||
uses: ./version
|
||||
with:
|
||||
github-token: ${{ steps.app-token.outputs.token }}
|
||||
version: pnpm bump
|
||||
script: pnpm bump
|
||||
|
||||
publish:
|
||||
name: Publish
|
||||
if: needs.version.outputs.hasChangesets == 'false'
|
||||
needs: version
|
||||
if: needs.select-mode.outputs.mode == 'publish'
|
||||
needs: select-mode
|
||||
runs-on: ubuntu-latest
|
||||
environment: marketplace
|
||||
timeout-minutes: 20
|
||||
@@ -82,7 +107,7 @@ jobs:
|
||||
run: pnpm build
|
||||
|
||||
- name: Publish to marketplace
|
||||
uses: ./
|
||||
uses: ./publish
|
||||
with:
|
||||
github-token: ${{ steps.app-token.outputs.token }}
|
||||
publish: pnpm release
|
||||
script: pnpm release
|
||||
|
||||
Reference in New Issue
Block a user