Use GitHub ci to release extension to the Chrome webstore (#133)

This commit is contained in:
Hendrik Eeckhaut
2025-02-07 09:30:35 +01:00
committed by GitHub
parent 423be796f6
commit 1c9f340add
2 changed files with 41 additions and 1 deletions

View File

@@ -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
.github/workflows/releng.yml vendored Normal file
View File

@@ -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 }}