Skip to content

Commit ceb8edd

Browse files
authored
Merge pull request #35 from btnguyen2k/dev
Prepare to release first version
2 parents 5526de9 + acfc0fc commit ceb8edd

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ jobs:
8888
echo ========== commit updates ==========
8989
git config --global user.email "<>"
9090
git config --global user.name "CI Build"
91-
git commit -am "Update ${FILE_CHANGELOG} and ${FILE_MODULE} for new version ${VERSION}"
92-
echo FIXME git push origin ${BRANCH_TO_RELEASE}
91+
git commit -am "Update ${FILE_CHANGELOG}, ${FILE_MODULE} and *.go files for new version ${VERSION}"
92+
git push origin ${BRANCH_TO_RELEASE}
9393
9494
echo ========== tag ==========
9595
git tag -f -a "${TAG_PREFIX}${VERSION}" -m "Release ${TAG_PREFIX}/v${VERSION}"
96-
echo FIXME git push origin "${TAG_PREFIX}${VERSION}" -f
96+
git push origin "${TAG_PREFIX}${VERSION}" -f
9797
echo "✅ Done."
9898
else
9999
echo "❎ SKIPPED."
@@ -118,7 +118,7 @@ jobs:
118118
const {data: pr} = await github.rest.pulls.create({
119119
owner: context.repo.owner,
120120
repo: context.repo.repo,
121-
title: "Merge branch semver to master after releasing new version ${{ needs.Release.outputs.VERSION }}",
121+
title: "Merge to main after releasing new version ${{ needs.Release.outputs.VERSION }}",
122122
body: process['env']['RELEASE_NOTES'],
123123
head: process['env']['BRANCH_TO_RELEASE'],
124124
base: 'main',

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@ Template to quickly spin up a Go module project.
1515
- `ci.yaml`: automatically run tests and generate code coverage report.
1616
- `release.yaml`: automatically create a new release.
1717

18-
**Workflow**
19-
20-
Workflow implemented by this template is as the following:
21-
22-
- Dependencies are checked and updated weekly by `dependabot.yaml`, and then PRs are automatically merged to `main` branch by `automerge-dependabot.yaml`.
23-
- `ci.yaml` is triggered on every push to any branch to run tests and generate code coverage report.
24-
- Once PR is approved and merged to `release` branch, `release.yaml` is triggered to create a new release. Then a new PR is created to merge `release` branch to `main` branch.
25-
2618
## Usage
2719

2820
1. Create new project from this template:
@@ -35,6 +27,23 @@ Workflow implemented by this template is as the following:
3527
5. Update other files to suit your needs.
3628
6. Happy coding!
3729

30+
**Workflows**
31+
32+
Workflows implemented by this template are as the following:
33+
34+
- Dependencies are checked and updated weekly by `dependabot.yaml`, and then PRs are automatically merged to `main` branch by `automerge-dependabot.yaml`.
35+
- `ci.yaml` is triggered on every push to any branch to run tests and generate code coverage report.
36+
- Once PR is approved and merged to `release` branch, `release.yaml` is triggered to create a new release. Then a new PR is created to merge `release` branch to `main` branch.
37+
38+
A suggested git workflow to use with this template is as the following:
39+
40+
- Work on your code in development/feature branches as usual.
41+
- Once ready, create a PR to merge your development/feature branch to `release` branch.
42+
- Workflow `release.yaml` will be triggered to create a new release.
43+
- Then a new PR will be created to merge `release` branch to `main` branch. Note: you have to review and approve the PR by yourself to finalize the merge.
44+
45+
> Remember to enable the setting "Allow GitHub Actions to create and approve pull requests" from project's `Settings -> Actions -> General`.
46+
3847
## License
3948

4049
This template is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

0 commit comments

Comments
 (0)