Skip to content

Commit

Permalink
ci(chrome_extension): add release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Aryan Goyal <[email protected]>
  • Loading branch information
ary82 committed Oct 2, 2024
1 parent a567579 commit 63dc601
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 6 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@ name: Docker

on:
push:
branches: [ "main" ]
branches: ["main"]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
tags: ["v*.*.*"]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}/backend


jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -38,7 +36,7 @@ jobs:
- name: Install cosign
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 #v3.5.0
with:
cosign-release: 'v2.2.4'
cosign-release: "v2.2.4"

# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: build and release extension
on:
push:

jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
cache-dependency-path: "**/pnpm-lock.json"
- name: Install dependencies
working-directory: ./chromium/socratic-code
run: pnpm install
- name: Build
working-directory: ./chromium/socratic-code
run: pnpm build
- name: Zip folder
working-directory: ./chromium/socratic-code
run: zip -r socratic-code.zip build
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./socratic-code/chromium/socratic-code.zip
2 changes: 1 addition & 1 deletion chromium/socratic-code/static/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Socratic Code",
"description": "A browser extension made with Svelte Kit",
"version": "0.0.1",
"version": "0.1.0",
"icons": {
"32": "socrates_32.png",
"64": "socrates_64.png",
Expand Down

0 comments on commit 63dc601

Please sign in to comment.