mirror of
https://github.com/bytedream/stream-bypass.git
synced 2026-08-04 21:10:40 +02:00
90 lines
2.9 KiB
YAML
90 lines
2.9 KiB
YAML
name: publish
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
workflow_dispatch:
|
|
inputs:
|
|
dry_run:
|
|
type: boolean
|
|
description: Dry run
|
|
default: true
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@008330803749db0355799c700092d9a85fd074e9 # v6.0.9
|
|
with:
|
|
version: 11
|
|
- name: Setup node
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: 26
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Zip extensions
|
|
run: |
|
|
pnpm run zip:firefox
|
|
pnpm run zip
|
|
|
|
- name: Resolve zip extension paths
|
|
id: paths
|
|
run: |
|
|
MV2_PATH=$(find .output -type f -name "*-mv2.zip")
|
|
MV2_NAME=$(basename $MV2_PATH)
|
|
MV3_PATH=$(find .output -type f -name "*-mv3.zip")
|
|
MV3_NAME=$(basename $MV3_PATH)
|
|
echo "mv2_path=$MV2_PATH" >> "$GITHUB_OUTPUT"
|
|
echo "mv2_name=$MV2_NAME" >> "$GITHUB_OUTPUT"
|
|
echo "mv3_path=$MV3_PATH" >> "$GITHUB_OUTPUT"
|
|
echo "mv3_name=$MV3_NAME" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Upload mv2 as artifact
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: ${{ steps.paths.outputs.mv2_name }}
|
|
path: ${{ steps.paths.outputs.mv2_path }}
|
|
|
|
- name: Upload mv3 as artifact
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: ${{ steps.paths.outputs.mv3_name }}
|
|
path: ${{ steps.paths.outputs.mv3_path }}
|
|
|
|
- name: Upload to latest release
|
|
if: github.event.inputs.dry_run != 'true'
|
|
uses: svenstaro/upload-release-action@ac75e1407b33421f1368f08e0e6cc567cc4edd25 # 2.11.5
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
file: .output/*mv*.zip
|
|
tag: ${{ github.ref }}
|
|
overwrite: true
|
|
file_glob: true
|
|
|
|
- name: Submit to stores
|
|
env:
|
|
DRY_RUN: ${{ github.event.inputs.dry_run }}
|
|
FIREFOX_EXTENSION_ID: stream-bypass
|
|
FIREFOX_JWT_ISSUER: ${{ secrets.FIREFOX_JWT_ISSUER }}
|
|
FIREFOX_JWT_SECRET: ${{ secrets.FIREFOX_JWT_SECRET }}
|
|
CHROME_EXTENSION_ID: ddfpfjomnakfckhmilacnbokdaknamdb
|
|
CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
|
|
CHROME_CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
|
|
CHROME_REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
|
|
run: |
|
|
pnpm exec wxt submit \
|
|
--firefox-zip .output/*-mv2.zip --firefox-sources-zip .output/*-sources.zip \
|
|
--chrome-zip .output/*-mv3.zip
|