Github actions for the package release.
😀🤓😎🤗😉😇
Example: 'Release {Semver Version}'
1.0.0 -> 1.0.1 ✅
1.0.0 -> 1.0.1 ✅
2.0.0 -> 1.0.0 ❎
Add the label to the Release Pull Request
1.0.0 -> 1.0.1 👉 semver:patch
1.0.0 -> 1.1.1 👉 semver:minor
1.0.0 -> 2.2.1 👉 semver:major
commit message: Release {Semver Version}
- Create tag
- Create release
- Publish to NPM
Enable Github Actions
Add NPM Token to Secrets.
Project - Settings - Secrets
NPM_TOKEN
.github/main.workflow
## workflow
workflow "Pull Request" {
on = "pull_request"
resolves = ["npm check"]
}
## actions
action "npm install" {
uses = "docker://thonatos/github-actions-nodejs"
args = "npm install"
}
action "npm ci" {
uses = "docker://thonatos/github-actions-nodejs"
needs = ["npm install"]
args = "npm run ci"
}
action "workman check" {
uses = "thonatos/github-actions-workman@master"
needs = ["npm ci"]
args = "workman check"
secrets = [
"GITHUB_TOKEN",
"NPM_TOKEN"
]
}
.github/main.workflow
## workflow
workflow "Push" {
on = "push"
resolves = ["workman release"]
}
## actions
action "npm install" {
uses = "docker://thonatos/github-actions-nodejs"
args = "npm install"
}
action "npm ci" {
uses = "docker://thonatos/github-actions-nodejs"
needs = ["npm install"]
args = "npm run ci"
}
action "workman release" {
uses = "thonatos/github-actions-workman@master"
needs = ["npm ci"]
args = "workman release --releaseBranch master"
secrets = [
"GITHUB_TOKEN",
"NPM_TOKEN"
]
}
Handle Pull Request
-
Create the PR(title:
Release {Semver Version}
)- check the release proposal
- check the release version
- check the release history
- add a label like:
semver:patch
-
Merge PR without deleting branch
- create a tag with the release version
- create a release with release history
- release the package with run
npm publish --access public
Please open an issue here.
Github Actions Release is MIT licensed.