-
-
Notifications
You must be signed in to change notification settings - Fork 421
55 lines (46 loc) · 1.54 KB
/
release-next.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Release Next
on:
push:
branches:
- next
concurrency:
group: release-next-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
uses: vue-styleguidist/vue-styleguidist/.github/workflows/test.yml@next
release-beta:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Init & Build
uses: ./.github/actions/build
- name: Setup GitHub User
run: |
git config --global user.name "Vue Styleguidist Bot"
git config --global user.email "${{ secrets.BOT_EMAIL }}"
- name: Fetch git log
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Create release Pull Request or publish to NPM
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
commit: 'ci(changesets): version packages'
title: 'ci(changesets): version packages'
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release to @next tag
if: steps.changesets.outputs.published != 'true'
run: |
pnpm exec changeset version --snapshot next
pnpm exec changeset publish --tag next
git push --follow-tags
- name: Update pnpm-lock.yaml
run: |
pnpm i --frozen-lockfile=false --ignore-scripts
git add pnpm-lock.yaml
git diff --staged --quiet || (git commit -m "chore: update lock file after release [ci skip]" && git push)