Skip to content

Commit

Permalink
feat: Add GitHub Actions workflows for release and testing automation
Browse files Browse the repository at this point in the history
  • Loading branch information
shfc committed Feb 3, 2025
1 parent 5cb78f7 commit 8e8ca5c
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/tagged-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
push:
tags:
- "v*"

env:
TARGET_NAME: "open-browser-time"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ '22.x' }}
cache: npm

- name: Install npm dependencies
run: npm install

- name: Build the extension
run: |
npm run build
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: ${{env.TARGET_NAME}}
files: |
dist
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Run Tests
on:
pull_request:
branches:
- "*"
push:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ '22.x' }}
cache: npm

- name: Install npm dependencies
run: npm install

- name: Run tests
run: npx jest

0 comments on commit 8e8ca5c

Please sign in to comment.