Skip to content

Commit

Permalink
chore: add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Jan 18, 2023
1 parent 4c63c41 commit 620f1d3
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 51 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
jobs:
test:
runs-on: ubuntu-latest
environment: release
name: Test
steps:
- name: setup repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: setup node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm ci
- run: npm run lint
- run: npm run test
- run: npm run build
timeout-minutes: 10
name: Test and build
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
- ready_for_review
27 changes: 27 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
jobs:
test:
runs-on: ubuntu-latest
environment: release
name: Test
steps:
- name: setup repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: setup node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm ci
- run: npm run lint
- run: npm run test
- run: npm run build
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
name: Test, build and release
on:
push:
branches:
- main
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ pnpm-lock.yaml
.*
!.babelrc.json
!.editorconfig
!.eslintrc.json
!.eslintignore
!.eslintrc.json
!.gitattributes
!.github
!.gitignore
!.husky
!.ncurc.js
!.npmignore
!.README
!.travis.yml
!.ncurc.js
!.github
!.husky
!.vscode
!.releaserc
!.vscode
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/github",
"@semantic-release/npm"
]
}
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
"@babel/register": "^7.18.9",
"@es-joy/jsdoc-eslint-parser": "^0.17.0",
"@hkdobrev/run-if-changed": "^0.3.1",
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/github": "^8.0.7",
"@semantic-release/npm": "^9.0.2",
"@typescript-eslint/parser": "^5.47.1",
"babel-plugin-add-module-exports": "^1.0.4",
"babel-plugin-istanbul": "^6.1.1",
Expand All @@ -44,7 +47,7 @@
"nyc": "^15.1.0",
"open-editor": "^3.0.0",
"rimraf": "^3.0.2",
"semantic-release": "^19.0.5",
"semantic-release": "^20.0.2",
"typescript": "^4.9.4"
},
"engines": {
Expand Down

0 comments on commit 620f1d3

Please sign in to comment.