Skip to content

Commit

Permalink
Merge pull request #943 from gajus/gajus/use-github-workflow
Browse files Browse the repository at this point in the history
Move to using GitHub workflows
  • Loading branch information
gajus authored Jan 18, 2023
2 parents 4c63c41 + b4fd37e commit 1806f8c
Show file tree
Hide file tree
Showing 9 changed files with 33,695 additions and 55 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
jobs:
lint:
runs-on: ubuntu-latest
name: Lint
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
timeout-minutes: 10
test:
runs-on: ubuntu-latest
name: Test (Node.js ${{ matrix.node_js_version }})
steps:
- name: setup repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: setup node.js
uses: actions/setup-node@v3
with:
node-version: '${{ matrix.node_js_version }}'
- run: npm ci
- run: npm run test
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
node_js_version:
- '14.17.0'
- '16'
- '18'
build:
runs-on: ubuntu-latest
name: Build
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 build
timeout-minutes: 10
name: Lint, test and build
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
- ready_for_review
25 changes: 25 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
jobs:
release:
runs-on: ubuntu-latest
environment: release
name: Release
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 build
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
name: Build and release
on:
push:
branches:
- main
14 changes: 6 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
coverage
dist
node_modules
package-lock.json
pnpm-lock.yaml
*.log
.*
!.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.

Loading

0 comments on commit 1806f8c

Please sign in to comment.