Skip to content

Commit

Permalink
Merge pull request #34 from piscis/dev/integrate-with-release-it
Browse files Browse the repository at this point in the history
feat: adds release-it configuration
  • Loading branch information
piscis authored Sep 19, 2023
2 parents 42166d2 + 552346f commit 0a33983
Show file tree
Hide file tree
Showing 5 changed files with 2,223 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cicd-vercel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: |
if [[ ${GITHUB_HEAD_REF} == dev/* || ${GITHUB_HEAD_REF} == renovate/* ]]; then
echo "env=staging" >> $GITHUB_OUTPUT
elif [[ "${{github.ref}}" == "refs/heads/main" && "${{github.event_name}}" == "push" ]]; then
elif [[ "${{github.ref}}" == "refs/heads/release" && "${{github.event_name}}" == "push" ]]; then
echo "env=production" >> $GITHUB_OUTPUT
else
echo "env=develop" >> $GITHUB_OUTPUT
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/sync-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Sync release branch

on:
push:
tags:
- 'v*.*.*'

jobs:
update-cms-master:
name: Merge main branch into release after a tag was created
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: merge
uses: mtanzi/action-automerge@v1
id: merge
with:
github_token: ${{ github.token }}
source: main
target: release
21 changes: 21 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true,
"releaseName": "v${version}"
},
"npm": {
"publish": false
},
"plugins": {
"@release-it/conventional-changelog": {
"infile": "CHANGELOG.md",
"preset": {
"name" : "conventionalcommits"
},
"header": "# Changelog"
}
}
}
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"> 2%"
],
"scripts": {
"release:patch": "release-it -i patch --only-version",
"release:minor": "release-it -i minor --only-version",
"release:major": "release-it -i major --only-version",
"clean": "rimraf node_modules .nuxt .output dist",
"build": "nuxt build",
"dev": "nuxt dev",
Expand All @@ -42,6 +45,7 @@
"@nuxt/test-utils": "^3.7.3",
"@nuxtjs/google-fonts": "^3.0.2",
"@nuxtjs/tailwindcss": "^6.8.0",
"@release-it/conventional-changelog": "^7.0.1",
"@tailwindcss/aspect-ratio": "^0.4.2",
"@types/cloudflare": "^2.7.11",
"@types/node": "^20.6.2",
Expand All @@ -53,6 +57,7 @@
"playwright": "^1.38.0",
"postcss": "^8.4.30",
"radash": "^11.0.0",
"release-it": "^16.1.5",
"sass": "1.67.0",
"tailwindcss": "^3.3.3",
"tailwindcss-debug-screens": "^2.2.1",
Expand Down
Loading

0 comments on commit 0a33983

Please sign in to comment.