Skip to content

Commit

Permalink
feat: release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
k.mesniankin committed Oct 5, 2024
1 parent fefe96b commit 301417f
Show file tree
Hide file tree
Showing 4 changed files with 3,464 additions and 51 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release
on:
push:
branches: [main]
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # to fetch all history for all branches and tags
# Setup node.js
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: yarn
# Dependencies
- name: Dependencies
run: yarn install --immutable
# Lint
- name: Lint
run: yarn lint
# Build
- name: Build
run: yarn build
# Release
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn semantic-release
10 changes: 10 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"branches": [
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github"
]
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"private": true,
"name": "smart-home-media-assistant-bot",
"version": "1.0.0",
"author": "Kirill Mesniankin <sadbox.games@gmail.com>",
Expand All @@ -9,7 +10,8 @@
"scripts": {
"dev": "NODE_ENV=development && node --loader ts-node/esm --enable-source-maps --no-warnings=ExperimentalWarning ./src/index.ts",
"build": "rm -rf dist && tsc",
"start": "NODE_ENV=production && node ./dist/index.js"
"start": "NODE_ENV=production && node ./dist/index.js",
"lint": "eslint src"
},
"dependencies": {
"@grammyjs/fluent": "^1.0.3",
Expand Down Expand Up @@ -37,6 +39,7 @@
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"semantic-release": "^24.1.2",
"ts-node": "^10.9.2",
"typescript": "^5.6.2",
"typescript-eslint": "^8.6.0"
Expand Down
Loading

0 comments on commit 301417f

Please sign in to comment.