Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/add-version-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,23 @@ jobs:
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/')
steps:
- name: Get version
run: echo "::set-env name=TAG_NAME::${HEAD_REF#release/}"
uses: technote-space/get-next-version-action@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: "! startsWith(github.event.pull_request.head.ref, 'release/v')"
- name: Get version
run: echo "::set-env name=NEXT_VERSION::${HEAD_REF#release/}"
env:
HEAD_REF: ${{ github.event.pull_request.head.ref }}
if: startsWith(github.event.pull_request.head.ref, 'release/v')
- uses: actions/github-script@0.4.0
with:
github-token: ${{ secrets.ACCESS_TOKEN }}
script: |
github.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${process.env.TAG_NAME}`,
ref: `refs/tags/${process.env.NEXT_VERSION}`,
sha: context.sha
})
if: env.NEXT_VERSION
2 changes: 1 addition & 1 deletion .github/workflows/pr-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
checkVersion:
name: Check package version
runs-on: ubuntu-latest
if: github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.event.pull_request.head.ref, 'release/')
if: github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.event.pull_request.head.ref, 'release/v')
steps:
- name: Set running flag
run: echo "::set-env name=RUNNING::1"
Expand Down
31 changes: 29 additions & 2 deletions .github/workflows/pr-updated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,39 @@ jobs:
manageRelease:
name: Manage release
runs-on: ubuntu-latest
if: github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.event.pull_request.head.ref, 'release/')
if: "github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.event.pull_request.head.ref, 'release/') && ! startsWith(github.event.pull_request.head.ref, 'release/v')"
steps:
- name: Manage release
uses: technote-space/manage-release-action@v1
uses: technote-space/release-type-action@v1
with:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
EXCLUDE_MESSAGES: |
update package version
update packages

checkVersion:
name: Check package version
runs-on: ubuntu-latest
if: "github.event.pull_request.head.user.id == github.event.pull_request.base.user.id && startsWith(github.event.pull_request.head.ref, 'release/') && ! startsWith(github.event.pull_request.head.ref, 'release/v')"
steps:
- name: Set running flag
run: echo "::set-env name=RUNNING::1"
- uses: actions/checkout@v2
- name: Set running flag
run: |
if [[ ! -f package.json ]] || [[ $(< package.json jq -r '.version == null') == 'true' ]]; then
echo "::set-env name=RUNNING::"
fi

- name: Get version
uses: technote-space/get-next-version-action@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: env.RUNNING
- name: Check package version
uses: technote-space/package-version-check-action@v1
with:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH_PREFIX: release/
NEXT_VERSION: ${{ env.NEXT_VERSION }}
if: env.NEXT_VERSION
6 changes: 3 additions & 3 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
PR_BRANCH_NAME: 'chore-npm-update-${PR_ID}'
PR_TITLE: 'chore: update npm dependencies (${PR_MERGE_REF})'
PR_DEFAULT_BRANCH_PREFIX: release/
PR_DEFAULT_BRANCH_NAME: ${PATCH_VERSION}
PR_DEFAULT_BRANCH_TITLE: 'feat: release ${PATCH_VERSION}'
PR_DEFAULT_BRANCH_NAME: next-${CURRENT_VERSION}
PR_DEFAULT_BRANCH_TITLE: 'feat: release'
TARGET_BRANCH_PREFIX: release/
AUTO_MERGE_THRESHOLD_DAYS: 30
AUTO_MERGE_THRESHOLD_DAYS: 14