Skip to content

Commit

Permalink
feat: add release workflow and changelog (#83)
Browse files Browse the repository at this point in the history
* feat: add release-it package

* fix: add tag name and inputs to workflow
  • Loading branch information
enfipy committed Jan 29, 2024
1 parent 7b254fc commit 42fbba0
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

concurrency:
group: release
cancel-in-progress: false

on:
workflow_dispatch:
inputs:
version:
description: "Version (major/minor/patch)"
required: true
default: "patch"

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup

- name: Set git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Create changelog and release
run: bun run release --ci -i=${{ github.event.inputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"main": "expo-router/entry",
"scripts": {
"android": "expo start --android",
"clean": "rm -rf node_modules .expo",
"clean": "rm -rf node_modules .expo dist",
"dev": "expo start --dev-client",
"fix": "expo install --fix",
"format": "prettier --write --ignore-path=../../.gitignore .",
Expand Down
Binary file modified bun.lockb
Binary file not shown.
47 changes: 47 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,19 @@
"fix-pkgs": "syncpack fix-mismatches && syncpack set-semver-ranges && syncpack format",
"format": "nx run-many -t=format --exclude=elrax --output-style=stream",
"lint": "nx run-many -t=lint --exclude=elrax --output-style=stream",
"release": "release-it",
"update-hooks": "simple-git-hooks"
},
"devDependencies": {
"@release-it/bumper": "6.0.1",
"@release-it/conventional-changelog": "8.0.1",
"@typescript-eslint/eslint-plugin": "6.19.0",
"@typescript-eslint/parser": "6.19.0",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
"nx": "17.2.8",
"prettier": "3.2.4",
"release-it": "17.0.3",
"simple-git-hooks": "2.9.0",
"syncpack": "12.3.0"
},
Expand Down Expand Up @@ -83,6 +87,49 @@
"trailingComma": "all",
"printWidth": 100
},
"release-it": {
"hooks": {
"after:bump": "bun run fix-pkgs"
},
"git": {
"tagName": "v${version}",
"requireBranch": "main",
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true,
"releaseName": "v${version}"
},
"npm": {
"publish": false
},
"plugins": {
"@release-it/bumper": {
"out": [
"apps/**/package.json",
"packages/**/package.json"
]
},
"@release-it/conventional-changelog": {
"infile": "CHANGELOG.md",
"header": "# Changelog",
"preset": {
"name": "conventionalcommits",
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{}
]
}
}
}
},
"simple-git-hooks": {
"pre-commit": "bun lint && bun fix-pkgs"
},
Expand Down

0 comments on commit 42fbba0

Please sign in to comment.