-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from mato533/release/test
[RELEASE] v1.0.6
- Loading branch information
Showing
9 changed files
with
181 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### Description | ||
|
||
Auto-generated pull request to master branch for release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
types: [closed] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.merged == true | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" | ||
GH_USER: "github-actions[bot]" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
cache: "yarn" | ||
- run: git config --local user.email "${{ env.GH_EMAIL }}" | ||
- run: git config --local user.name "${{ env.GH_USER }}" | ||
|
||
- run: echo test | ||
- run: echo "${{ github.event.pull_request.head.ref }}" | ||
|
||
- run: echo "${{ github.event.pull_request.title }}" | ||
- run: echo "APP_VERSION=$(echo ${{ github.event.pull_request.title }} |grep -o -E "([0-9]+\.){1}[0-9]+(\.[0-9]+)?" | head -n1)">>"${GITHUB_ENV}" | ||
- run: | | ||
APP_VERSION=$(echo ${{ github.event.pull_request.title }} |grep -o -E "([0-9]+\.){1}[0-9]+(\.[0-9]+)?" | head -n1)" | ||
if [ ! -n "${APP_VERSION}" ] | ||
then | ||
exit 255 | ||
fi | ||
- run: | | ||
git tag "v${APP_VERSION}" | ||
git push origin "v${APP_VERSION}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Pre-release tasks | ||
|
||
on: | ||
push: | ||
branches: | ||
- release/** | ||
tags: | ||
- "!*" | ||
|
||
jobs: | ||
pre-releas-task: | ||
if: "${{ contains(github.event.head_commit.message, 'release:') }}" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" | ||
GH_USER: "github-actions[bot]" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
cache: "yarn" | ||
|
||
- run: echo "CHANGELOG">>./test.txt | ||
- run: echo lint | ||
- run: echo "APP_VERSION=$(echo ${{ github.event.head_commit.message }} |grep -o -E "([0-9]+\.){1}[0-9]+(\.[0-9]+)?" | head -n1)">>"${GITHUB_ENV}" | ||
- run: yarn version --new-version "${{ env.APP_VERSION }}" --no-git-tag-version | ||
- run: git config --local user.email "${{ env.GH_EMAIL }}" | ||
- run: git config --local user.name "${{ env.GH_USER }}" | ||
- run: | | ||
git add -N . | ||
if ! git diff --exit-code --quiet | ||
then | ||
git add . | ||
git commit -m "Update" | ||
git push | ||
fi | ||
- run: echo "${{ env.APP_VERSION }}" | ||
- run: echo "PR_TITLE=[RELEASE] v${{ env.APP_VERSION }}">>"${GITHUB_ENV}" | ||
- run: echo "PR_COUNT=$(gh pr list -S '${{ env.PR_TITLE }}' in:title | wc -l)" >>"${GITHUB_ENV}" | ||
|
||
- name: Create pull request(for master) | ||
if: ${{ env.PR_COUNT }} == 0 | ||
run: | | ||
gh pr create \ | ||
-B master \ | ||
-t '${{ env.PR_TITLE }}' \ | ||
-a ${{ github.actor }} \ | ||
--body-file ./.github/RELEASE_WORKFLOW_TEMPLATE.md | ||
- name: Create pull request(for develop) | ||
if: ${{ env.PR_COUNT }} == 0 | ||
run: | | ||
gh pr create \ | ||
-B develop \ | ||
-t '${{ env.PR_TITLE }}' \ | ||
-a ${{ github.actor }} \ | ||
--body-file ./.github/RELEASE_WORKFLOW_TEMPLATE.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ edit1 | |
edit2 | ||
|
||
edit3 | ||
|
||
edot4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
module.exports = { | ||
disableEmoji: true, | ||
list: ['test', 'feat', 'fix', 'chore', 'docs', 'refactor', 'style', 'ci', 'perf','release'], | ||
|
||
types: { | ||
chore: { | ||
description: 'Build process or auxiliary tool changes', | ||
value: 'chore' | ||
}, | ||
ci: { | ||
description: 'CI related changes', | ||
value: 'ci' | ||
}, | ||
docs: { | ||
description: 'Documentation only changes', | ||
value: 'docs' | ||
}, | ||
feat: { | ||
description: 'A new feature', | ||
value: 'feat' | ||
}, | ||
fix: { | ||
description: 'A bug fix', | ||
value: 'fix' | ||
}, | ||
perf: { | ||
description: 'A code change that improves performance', | ||
value: 'perf' | ||
}, | ||
refactor: { | ||
description: 'A code change that neither fixes a bug or adds a feature', | ||
value: 'refactor' | ||
}, | ||
release: { | ||
description: 'Create a release commit', | ||
value: 'release' | ||
}, | ||
style: { | ||
description: 'Markup, white-space, formatting, missing semi-colons...', | ||
value: 'style' | ||
}, | ||
test: { | ||
description: 'Adding missing tests', | ||
value: 'test' | ||
}, | ||
release: { | ||
description: 'Releas version', | ||
value: 'release' | ||
} | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "ci-test-project", | ||
"version": "1.0.2", | ||
"main": "index.js", | ||
"repository": "https://github.com/mato533/test1.git", | ||
"author": "mato533 <[email protected]>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"typescript": "^5.1.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
CHANGELOG | ||
CHANGELOG | ||
CHANGELOG | ||
CHANGELOG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
typescript@^5.1.3: | ||
version "5.1.3" | ||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.3.tgz#8d84219244a6b40b6fb2b33cc1c062f715b9e826" | ||
integrity sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw== |