Skip to content

Commit

Permalink
fix: add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tatupesonen committed Oct 24, 2024
1 parent 2b886ac commit 28a75e4
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy Chrome Extension

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

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

- name: Install dependencies
run: npm ci

- name: Build extension
run: npm run build

- name: Zip the extension
run: zip -r contextualize.zip ./build

- name: Create GitHub release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Extract version
id: extract_version
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./contextualize.zip
asset_name: contextualize-${{ env.VERSION }}.zip
asset_content_type: application/zip

0 comments on commit 28a75e4

Please sign in to comment.