Skip to content

Commit

Permalink
Merge pull request #108 from raydak-labs/ci/release-flow
Browse files Browse the repository at this point in the history
ci: test release-it
  • Loading branch information
BlackDark authored Nov 16, 2024
2 parents bdaa258 + 6853084 commit 0df7d42
Show file tree
Hide file tree
Showing 4 changed files with 2,237 additions and 6 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release-it.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: release-it

on:
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.RELEASER_CLIENT_ID }}
private_key: ${{ secrets.RELEASER_PRIVATE_KEY }}

- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ steps.generate_token.outputs.token }}
fetch-depth: 0

- name: git config
run: |
git config user.email "[email protected]"
git config user.name "raydak-releaser[bot]"
- uses: pnpm/action-setup@v4
with:
version: latest

- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm

- run: pnpm install

- run: pnpm release-it --ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"npm": false,
"git": {
"commitMessage": "chore: release ${version}",
"requireCleanWorkingDir": false
},
"github": {
"release": true,
"comments": {
"submit": true
}
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "conventionalcommits",
"infile": "CHANGELOG.md",
"header": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n"
}
},
"hooks": {
"after:release": "echo \"RELEASED_VERSION=${version}\" >> $GITHUB_ENV"
}
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"lint": "prettier . --check",
"start": "tsx src/index.ts",
"test": "vitest",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --noEmit",
"release": "release-it"
},
"author": "",
"license": "ISC",
Expand All @@ -27,10 +28,12 @@
"devDependencies": {
"@hyrious/esbuild-plugin-commonjs": "0.2.4",
"@playwright/test": "1.48.2",
"@release-it/conventional-changelog": "9.0.3",
"@types/node": "22.8.6",
"@vitest/coverage-v8": "2.1.4",
"esbuild": "0.24.0",
"prettier": "3.3.3",
"release-it": "17.10.0",
"swagger-typescript-api": "13.0.22",
"typescript": "5.6.3",
"vitest": "2.1.4"
Expand Down
Loading

0 comments on commit 0df7d42

Please sign in to comment.