Skip to content
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

feat: automate release #1269

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/conventional-commit.yml
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/pr-conventional-commits@1.4.0
with:
task_types: '["feat","fix", "docs", "test", "ci", "refactor", "chore", "revert"]'
add_label: 'false'
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release Every Other Monday
on:
workflow_dispatch:
# @TODO: byweekly check
# Run action at 16:15 PM on Monday (UTC)
# schedule:
# - cron: '15 16 * * 1'

# 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
# @TODO: Add deploy key pair
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: yarn
- run: yarn release --ci --verbose
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .release-it.json
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
}
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"ts-check": "yarn tsc --noEmit --skipLibCheck",
"test": "jest",
"pretest:e2e": "node test/playwright/generateTestData.js",
"test:e2e": "yarn playwright test"
"test:e2e": "yarn playwright test",
"release": "release-it --"
},
"targets": {
"veda-app": {
Expand Down Expand Up @@ -57,6 +58,7 @@
"@parcel/transformer-typescript-types": "2.12.0",
"@parcel/transformer-webmanifest": "2.7.0",
"@playwright/test": "^1.46.1",
"@release-it/conventional-changelog": "^9.0.3",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.2",
"@types/d3": "^7.4.0",
Expand Down Expand Up @@ -100,6 +102,7 @@
"posthtml-expressions": "^1.9.0",
"prettier": "^2.4.1",
"process": "^0.11.10",
"release-it": "^17.10.0",
"remark-gfm": "^3.0.1",
"stream-browserify": "^3.0.0",
"string_decoder": "^1.3.0",
Expand Down
Loading