Skip to content

Commit 08aa777

Browse files
committed
ci(chrome_extension): add release workflow
Signed-off-by: Aryan Goyal <[email protected]>
1 parent a567579 commit 08aa777

File tree

6 files changed

+49
-9
lines changed

6 files changed

+49
-9
lines changed

.github/workflows/backend.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,18 @@ name: Docker
77

88
on:
99
push:
10-
branches: [ "main" ]
10+
branches: ["main"]
1111
# Publish semver tags as releases.
12-
tags: [ 'v*.*.*' ]
12+
tags: ["v*.*.*"]
1313

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

20-
2120
jobs:
2221
build:
23-
2422
runs-on: ubuntu-latest
2523
permissions:
2624
contents: read
@@ -38,7 +36,7 @@ jobs:
3836
- name: Install cosign
3937
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 #v3.5.0
4038
with:
41-
cosign-release: 'v2.2.4'
39+
cosign-release: "v2.2.4"
4240

4341
# Set up BuildKit Docker container builder to be able to build
4442
# multi-platform images and export cache

.github/workflows/release.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: build and release extension
2+
on:
3+
push:
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-22.04
8+
permissions:
9+
contents: write
10+
packages: write
11+
strategy:
12+
matrix:
13+
node-version: [20]
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v4
18+
with:
19+
version: 9
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: "pnpm"
25+
cache-dependency-path: "chromium/socratic-code/pnpm-lock.yaml"
26+
- name: Install dependencies
27+
working-directory: ./chromium/socratic-code
28+
run: pnpm install
29+
- name: Build
30+
working-directory: ./chromium/socratic-code
31+
run: pnpm build
32+
- name: Zip folder
33+
working-directory: ./chromium/socratic-code
34+
run: zip -r socratic-code.zip build
35+
- name: Release
36+
uses: softprops/action-gh-release@v2
37+
with:
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
tag_name: "v1.0.0"
40+
prerelease: false
41+
draft: false
42+
generate_release_notes: false
43+
files: ./chromium/socratic-code/socratic-code.zip

chromium/socratic-code/.env.example

-1
This file was deleted.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
// place files you want to import through the `$lib` alias in this folder.
1+
export const PUBLIC_BACKEND_URL = 'https://socratic-leetcode-875479114962.asia-south1.run.app';

chromium/socratic-code/src/routes/+page.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
2+
import { PUBLIC_BACKEND_URL } from '$lib';
23
import { onMount } from 'svelte';
3-
import { PUBLIC_BACKEND_URL } from '$env/static/public';
44
55
let content: string = '';
66

chromium/socratic-code/static/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 3,
33
"name": "Socratic Code",
44
"description": "A browser extension made with Svelte Kit",
5-
"version": "0.0.1",
5+
"version": "0.1.0",
66
"icons": {
77
"32": "socrates_32.png",
88
"64": "socrates_64.png",

0 commit comments

Comments
 (0)