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

ci: test release-it #108

Merged
merged 1 commit into from
Nov 16, 2024
Merged
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
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