-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: automate release #1269
ci: automate release #1269
Changes from all commits
d8813bb
14f116d
81a7a67
e0d587e
26281cf
b9afbd9
e3695fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: PR Title Checks | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, edited] | ||
|
||
jobs: | ||
validate-pr-title: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Conventional Commit Validation | ||
uses: ytanikin/[email protected] | ||
with: | ||
task_types: '["feat","fix", "docs", "test", "ci", "refactor", "chore", "revert"]' | ||
add_label: 'false' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Release Every Other Monday | ||
on: | ||
workflow_dispatch: | ||
# Run action at 16:15 PM on Monday (UTC) | ||
# schedule: | ||
# @TODO: the schedule below is weekly. Do byweekly check. | ||
# - cron: '15 16 * * 1' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to note that before uncommenting this we should adjust the cron job as well to actually run biweekly ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yah, I left it as a |
||
|
||
# Sets the GITHUB_TOKEN permissions to allow release | ||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ssh-key: ${{ secrets.DEPLOY_KEY }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noting that this was used to bypass the branch protection rule. But I would like to replace it to use GitHub App in the future. (Specifically, when this actions starts triggering the instance build.) |
||
- name: git config | ||
run: | | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
- name: Use Node.js ${{ env.NODE }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE }} | ||
- run: yarn | ||
hanbyul-here marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- run: yarn release --ci --verbose | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"hooks": {}, | ||
"plugins": { | ||
"@release-it/conventional-changelog": { | ||
"preset": { | ||
"name": "conventionalcommits" | ||
} | ||
} | ||
}, | ||
"git": { | ||
"changelog": "git log --pretty=format:\"* %s (%h)\" ${from}...${to}", | ||
"commitMessage": "chore(release): update to version v${version}", | ||
"tagName": "v${version}", | ||
"tagAnnotation": "Release v${version}", | ||
"pushArgs": ["--follow-tags"], | ||
"getLatestTagFromAllRefs": true | ||
}, | ||
"npm": { | ||
"publish": false | ||
}, | ||
"github": { | ||
"release": true, | ||
"releaseName": "V${version}", | ||
"releaseNotes": null, | ||
"autoGenerate": true, | ||
"preRelease": false, | ||
"draft": false | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ : Would general updates like to wording count as a
chore
orfix
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it depends on what general updates do - if it is a fix for something I would prefix it with
fix:
. This cheatsheet might be helpful: https://gist.github.com/qoomon/5dfcdf8eec66a051ecd85625518cfd13#types