-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add github actions, auto release & dependabot
- Loading branch information
Showing
3 changed files
with
160 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
interval: 'daily' | ||
commit-message: | ||
prefix: 'chore' | ||
include: 'scope' | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: 'daily' | ||
commit-message: | ||
prefix: 'chore' | ||
include: 'scope' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Test & Maybe Release | ||
on: [push, pull_request] | ||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: [18.x, 20.x, lts/*] | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4.1.1 | ||
- name: Use Node.js ${{ matrix.node }} | ||
uses: actions/setup-node@v4.0.0 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- name: Install Dependencies | ||
run: | | ||
npm install --no-progress | ||
- name: Run tests | ||
run: | | ||
npm test | ||
release: | ||
name: Release | ||
needs: test | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4.1.1 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4.0.0 | ||
with: | ||
node-version: lts/* | ||
- name: Install dependencies | ||
run: | | ||
npm install --no-progress --no-package-lock --no-save | ||
- name: Build | ||
run: | | ||
npm run build | ||
- name: Install plugins | ||
run: | | ||
npm install \ | ||
@semantic-release/commit-analyzer \ | ||
conventional-changelog-conventionalcommits \ | ||
@semantic-release/release-notes-generator \ | ||
@semantic-release/npm \ | ||
@semantic-release/github \ | ||
@semantic-release/git \ | ||
@semantic-release/changelog \ | ||
--no-progress --no-package-lock --no-save | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npx semantic-release | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters