Skip to content

Commit ee8350b

Browse files
chore: sync workflows
1 parent 8916d09 commit ee8350b

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

.github/workflows/add-version-tag.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,23 @@ jobs:
1313
if: github.event.pull_request.merged == true && github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.event.pull_request.head.ref, 'release/')
1414
steps:
1515
- name: Get version
16-
run: echo "::set-env name=TAG_NAME::${HEAD_REF#release/}"
16+
uses: technote-space/get-next-version-action@v1
17+
with:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
if: github.event.pull_request.head.ref == 'release/next'
20+
- name: Get version
21+
run: echo "::set-env name=NEXT_VERSION::${HEAD_REF#release/}"
1722
env:
1823
HEAD_REF: ${{ github.event.pull_request.head.ref }}
24+
if: startsWith(github.event.pull_request.head.ref, 'release/v')
1925
- uses: actions/[email protected]
2026
with:
2127
github-token: ${{ secrets.ACCESS_TOKEN }}
2228
script: |
2329
github.git.createRef({
2430
owner: context.repo.owner,
2531
repo: context.repo.repo,
26-
ref: `refs/tags/${process.env.TAG_NAME}`,
32+
ref: `refs/tags/${process.env.NEXT_VERSION}`,
2733
sha: context.sha
2834
})
35+
if: env.NEXT_VERSION

.github/workflows/pr-opened.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
checkVersion:
3939
name: Check package version
4040
runs-on: ubuntu-latest
41-
if: github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.event.pull_request.head.ref, 'release/')
41+
if: github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.event.pull_request.head.ref, 'release/v')
4242
steps:
4343
- name: Set running flag
4444
run: echo "::set-env name=RUNNING::1"

.github/workflows/pr-updated.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ jobs:
3636
manageRelease:
3737
name: Manage release
3838
runs-on: ubuntu-latest
39-
if: github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.event.pull_request.head.ref, 'release/')
39+
if: github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && github.event.pull_request.head.ref == 'release/next'
4040
steps:
4141
- name: Manage release
42-
uses: technote-space/manage-release-action@v1
42+
uses: technote-space/release-type-action@v1
4343
with:
4444
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
4545
EXCLUDE_MESSAGES: |

.github/workflows/update-dependencies.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
PR_BRANCH_NAME: 'chore-npm-update-${PR_ID}'
2626
PR_TITLE: 'chore: update npm dependencies (${PR_MERGE_REF})'
2727
PR_DEFAULT_BRANCH_PREFIX: release/
28-
PR_DEFAULT_BRANCH_NAME: ${PATCH_VERSION}
28+
PR_DEFAULT_BRANCH_NAME: next
2929
PR_DEFAULT_BRANCH_TITLE: 'feat: release ${PATCH_VERSION}'
3030
TARGET_BRANCH_PREFIX: release/
31-
AUTO_MERGE_THRESHOLD_DAYS: 30
31+
AUTO_MERGE_THRESHOLD_DAYS: 14

0 commit comments

Comments
 (0)