Skip to content

Commit

Permalink
fix: ci to run semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpmohiburrahman committed Jun 24, 2024
1 parent 11bbdd0 commit 1bdf6a5
Show file tree
Hide file tree
Showing 3 changed files with 1,798 additions and 12 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/ci-chrome.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@

name: Update Chrome Extension

on:
push:
tags:
- "v*" # Trigger the workflow only for tags starting with "v"
branches:
- main

jobs:
release:
name: Semantic Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'

- name: Install dependencies
run: npm ci

- name: Build and release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release

build-chrome-extension:
name: Build Chrome Extension Artifact
runs-on: ubuntu-latest
needs: release
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -25,11 +45,6 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Update manifest version
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/}
jq --arg version "$TAG_VERSION" '.version=$version' manifest.json > temp.json && mv temp.json manifest.json
- name: Build
run: |
# Create the dist folder by building the extension
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
"react-dom": "18.2.0"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^13.0.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/release-notes-generator": "^14.0.1",
"@types/chrome": "^0.0.268",
"@types/node": "^20.12.11",
"@types/react": "^18.3.2",
Expand All @@ -47,6 +51,7 @@
"postcss": "^8.4.38",
"prettier": "^3.2.5",
"rimraf": "^5.0.7",
"semantic-release": "^24.0.0",
"tailwindcss": "^3.4.3",
"tslib": "^2.6.2",
"turbo": "^1.13.3",
Expand Down
Loading

0 comments on commit 1bdf6a5

Please sign in to comment.