Skip to content

Commit

Permalink
build: Add workflows for building & publishing package
Browse files Browse the repository at this point in the history
  • Loading branch information
Devil7DK committed Feb 12, 2022
1 parent b69a76c commit 1642fa6
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 6 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: build

on:
push:
branches:
- master
paths:
- 'src/**'
- 'package.json'
- 'tsconfig.json'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- run: yarn install
- run: yarn build
21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: publish

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- run: yarn install
- run: yarn build
- uses: JS-DevTools/npm-publish@v1
with:
access: 'public'
token: ${{ secrets.NPM_TOKEN }}
15 changes: 9 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
}
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "file:///home/devil7dk/Projects/eslint-plugin-swagger/.github/workflows/build.yml"
}
}

0 comments on commit 1642fa6

Please sign in to comment.