Skip to content

Commit

Permalink
chore: add gh actions to release and build
Browse files Browse the repository at this point in the history
  • Loading branch information
carpasse committed Apr 17, 2024
1 parent ac7b3c2 commit 4f92ad5
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build
on:
push:
branches-ignore:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
cache: 'yarn'
check-latest: true
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run tests
run: yarn run test
- name: Lint code
run: yarn run lint
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
cache: 'yarn'
check-latest: true
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run tests
run: yarn run test
- name: Lint code
run: yarn run lint
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn run semantic-release
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
node_modules
*.log
.*
!.github
!.husky
!.gitignore
!.npmignore
Expand Down

0 comments on commit 4f92ad5

Please sign in to comment.