Skip to content

Commit

Permalink
Merge pull request #9 from admon84/feat/semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
admon84 authored Jun 20, 2024
2 parents a9bde33 + 489277c commit 4ba09c6
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 6 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release
on:
push:
branches:
- main
pull_request:
types:
- closed
branches:
- main
jobs:
release:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
13 changes: 13 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
{
"@semantic-release/github": {
"assets": ["dist/**", "public/**"]
}
}
]
}
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"configFile": "./.vscode/.eslintrc.yaml"
},
"files.exclude": {
"dist": true,
"node_modules": true,
},
"files.insertFinalNewline": true,
Expand Down
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"name": "screepers-steamless-client",
"description": "A browser client for Screeps",
"type": "module",
"version": "1.8.0",
"bin": "dist/index.js",
"scripts": {
"eslint": "eslint $(git ls-files '*.ts' '*.tsx')",
"prepare": "tsc",
"watch": "tsc -w"
"build": "tsc",
"dev": "tsc -w",
"lint": "eslint $(git ls-files '*.ts')",
"prepare": "tsc"
},
"repository": {
"type": "git",
Expand All @@ -20,13 +22,18 @@
"homepage": "https://github.com/screepers/steamless-client#readme",
"devDependencies": {
"@laverdet/eslint-config": "github:laverdet/eslint-config#a12fa0a782425b584992fc937eb0db43642b560a",
"@semantic-release/commit-analyzer": "^13.0.0",
"@semantic-release/github": "^10.0.6",
"@semantic-release/npm": "^12.0.1",
"@semantic-release/release-notes-generator": "^14.0.0",
"@types/argparse": "2.0.10",
"@types/http-proxy": "1.17.7",
"@types/js-beautify": "1.13.2",
"@types/koa": "2.13.4",
"@types/koa-conditional-get": "2.0.0",
"@types/node": "16.4.13",
"@types/node-fetch": "2.5.12",
"semantic-release": "^24.0.0",
"typescript": "4.3.5"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"outDir": "dist",
"rootDir": "src",
"allowSyntheticDefaultImports": true,
"declaration": true,
"declaration": false,
"lib": [ "esnext", "dom" ],
"module": "esnext",
"moduleResolution": "node",
"noImplicitOverride": true,
"sourceMap": true,
"sourceMap": false,
"strict": true,
"target": "esnext",
"skipLibCheck": true
Expand Down

0 comments on commit 4ba09c6

Please sign in to comment.