Skip to content

Commit

Permalink
Use GitHub ci to release extension to the Chrome webstore (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
heeckhau authored Feb 7, 2025
1 parent 423be79 commit 1c9f340
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,12 @@ jobs:
run: pnpm install

- name: Build
run: npm run build
run: npm run build

- name: Save extension zip file for tagged builds
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: tlsn-extension-${{ github.ref_name }}.zip
path: ./zip/tlsn-extension-${{ github.ref_name }}.zip
if-no-files-found: error
32 changes: 32 additions & 0 deletions .github/workflows/releng.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish tlsn-wasm to NPM

on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to publish to Google Play Store'
required: true
default: '0.1.0.703'

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: 📦 Download build artifacts
uses: actions/download-artifact@v4
with:
name: tlsn-extension-${{ github.event.inputs.tag }}.zip

# Get tokens as documented on
# * https://developer.chrome.com/docs/webstore/using-api#beforeyoubegin
# * https://github.com/fregante/chrome-webstore-upload-keys?tab=readme-ov-file
#
- name: 💨 Publish
uses: browser-actions/release-chrome-extension@latest # https://github.com/browser-actions/release-chrome-extension/tree/latest/
with:
extension-id: "gcfkkledipjbgdbimfpijgbkhajiaaph"
extension-path: tlsn-extension-${{ github.event.inputs.tag }}.zip
oauth-client-id: ${{ secrets.OAUTH_CLIENT_ID }}
oauth-client-secret: ${{ secrets.OAUTH_CLIENT_SECRET }}
oauth-refresh-token: ${{ secrets.OAUTH_REFRESH_TOKEN }}

0 comments on commit 1c9f340

Please sign in to comment.