Add A to B:
steps:
- name: Sum up
id: sum
uses: js-templates/github-action@v1
with:
a: 2
b: 2
Use result:
- name: Echo sum
run: echo "${{ steps.sum.outputs.result }}"
a
- first numberb
- second number
result
- sum of A and B
- Fork this repo
- Use the Regular flow
Please follow Conventions
The dev branch is main
- any developer changes is merged in there.
All changes is made using Pull Requests - push is forbidden. PR can be merged only after successfull test-and-build
workflow checks.
When PR is merged, release-drafter
workflow creates/updates a draft release. The changelog is built from the merged branch scope (feat
, fix
, etc) and PR title. When release is ready - we publish the draft.
Then, the update-major-tag
workflow sets an additional tag for your major version, so your action can be used like scope/action@v1
instead of explicitly specifying v1.0.0
version.
- Create feature branch
- Make changes in your feature branch and commit
You may omit runningbuild
script, since the pre-commit hook does it automatically - Create a Pull Request from your feature branch to
main
The PR is needed to test the code before pushing to release branch - If your PR contains breaking changes, don't forget to put a
BREAKING CHANGES
label - Merge the PR in
main
- All done! Now you have a drafted release - just publish it when ready
Feature branches:
- Should start with
feat/
,fix/
,docs/
,refactor/
, and etc., depending on the changes you want to propose (see pr-labeler.yml for a full list of scopes)
Commits:
- Should follow the Conventional Commits specification
Pull requests:
- Should have human-readable name, for example: "Add a TODO list feature"
- Should describe changes
- Should have correct labels
- Replace all
js-templates/github-action
entries with your full action name - Replace all
github-action
entries with your action name - Replace all
Your Github Action Description
entries with your action description - Replace all
Your Name
entries with your name
FULL_ACCESS_GITHUB_TOKEN
if you plan to set up the branch protection
- Go to
Settings
>Branches
>Add rule
- Specify
main
branch - Enable the following options:
- Require a pull request before merging (without approvals)
- Require status checks to pass before merging (you need to run them at least once to appear):
test-and-build
pr-labeler
- Include administrators
- Allow force pushes
- Create a new Personal Access Token with
repo
permissions - Use it as a new Secret named
FULL_ACCESS_GITHUB_TOKEN
It's needed to bypass the branch protection on CI runs
Remove Using Template section from README (don't forget about Navigation links)