Skip to content

Commit

Permalink
ci(github): init ci, semantic-release setup
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauNeko committed Nov 14, 2023
1 parent b3342c1 commit b0f3193
Show file tree
Hide file tree
Showing 5 changed files with 1,300 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
node: true,
},
extends: ["plugin:@typescript-eslint/disable-type-checked"],
files: [".eslintrc.{js,cjs}"],
files: [".eslintrc.{js,cjs}", "release.config.{js,cjs}"],
parserOptions: {
sourceType: "script",
},
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release
on:
push:
branches:
- main
- develop

permissions:
contents: write
issues: write
pull-requests: write

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build release bundle
run: pnpm build
- name: Release
run: pnpm semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "discord-unread-voice-text",
"version": "0.1.0",
"version": "0.0.0-development",
"description": "",
"main": "index.js",
"scripts": {
"build": "webpack --progress --color",
"test": "echo \"Error: no test specified\" && exit 1"
"build": "webpack --progress --color"
},
"keywords": [],
"author": "",
Expand All @@ -14,6 +13,8 @@
"@commitlint/cli": "^18.4.1",
"@commitlint/config-conventional": "^18.4.0",
"@commitlint/types": "^18.4.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/betterdiscord": "github:zerthox/betterdiscord-types",
"@types/node": "^20.9.0",
"@types/webpack": "^5.28.5",
Expand All @@ -24,10 +25,15 @@
"eslint": "^8.53.0",
"eslint-plugin-prettier": "^5.0.1",
"prettier": "^3.1.0",
"semantic-release": "^22.0.7",
"ts-loader": "^9.5.0",
"ts-node": "^10.9.1",
"typescript": "^5.2.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
},
"repository": {
"type": "git",
"url": "https://github.com/fmauNeko/DiscordUnreadVoiceText.git"
}
}
Loading

0 comments on commit b0f3193

Please sign in to comment.