-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1f8edb
commit 2684381
Showing
29 changed files
with
277 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,6 @@ on: | |
push: | ||
branches: | ||
- master | ||
- mobile-release | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
|
@@ -267,8 +266,8 @@ jobs: | |
name: ${{ env.APP_NAME }}-firefox.zip | ||
path: ${{ env.APP_NAME }}-firefox.zip | ||
|
||
extensions-publish: | ||
name: Publish extensions | ||
chrome-publish: | ||
name: Publish Chrome extension | ||
needs: extensions-package | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
@@ -302,6 +301,27 @@ jobs: | |
REFRESH_TOKEN: ${{ secrets.GOOGLE_REFRESH_TOKEN }} | ||
run: npx --yes chrome-webstore-upload-cli@2 upload --auto-publish --source ${{ env.CHROME_FILE_NAME }} | ||
|
||
firefox-publish: | ||
name: Publish Firefox extension | ||
needs: extensions-package | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
if: vars.PUBLISH_REPO != '' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
|
||
- name: Set environment variables | ||
id: variables | ||
shell: bash | ||
run: | | ||
echo "FIREFOX_FILE_NAME=${{ env.APP_NAME }}-firefox.zip" >> "$GITHUB_ENV" | ||
- name: Download Firefox extension artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
|
@@ -314,19 +334,55 @@ jobs: | |
# App env | ||
PROXY_HOSTS: ${{ vars.PROXY_HOSTS }} | ||
STAKING_POOLS: ${{ vars.STAKING_POOLS }} | ||
if: ${{ env.WEB_EXT_API_KEY != '' }} | ||
run: | | ||
npm i jsonwebtoken@9 web-ext-submit@7 | ||
UNZIP_DIR=/tmp/${{ env.APP_NAME }}-firefox | ||
mkdir $UNZIP_DIR | ||
unzip ${{ env.FIREFOX_FILE_NAME }} -d $UNZIP_DIR | ||
npx web-ext-submit --source-dir=$UNZIP_DIR/dist | ||
npx web-ext-submit --source-dir=$UNZIP_DIR | ||
echo "APP_NAME=\"${APP_NAME}\" | ||
PROXY_HOSTS=\"${PROXY_HOSTS}\" | ||
STAKING_POOLS=\"${STAKING_POOLS}\"" >.env | ||
bash deploy/firefox_pack_sources.sh | ||
node deploy/firefoxPatchVersion.js | ||
edge-publish: | ||
name: Publish Edge extension | ||
needs: extensions-package | ||
runs-on: ubuntu-latest | ||
if: vars.PUBLISH_REPO != '' | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
|
||
- name: Set environment variables | ||
id: variables | ||
shell: bash | ||
run: | | ||
echo "CHROME_FILE_NAME=${{ env.APP_NAME }}-chrome.zip" >> "$GITHUB_ENV" | ||
- name: Download Chrome extension artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ env.CHROME_FILE_NAME }} | ||
|
||
- name: Publish to Edge store | ||
env: | ||
EDGE_PRODUCT_ID: ${{ secrets.EDGE_PRODUCT_ID }} | ||
EDGE_CLIENT_ID: ${{ secrets.EDGE_CLIENT_ID }} | ||
EDGE_CLIENT_SECRET: ${{ secrets.EDGE_CLIENT_SECRET }} | ||
EDGE_ACCESS_TOKEN_URL: ${{ secrets.EDGE_ACCESS_TOKEN_URL }} | ||
run: | | ||
npm i @plasmohq/[email protected] | ||
export EDGE_FILE_PATH="./$CHROME_FILE_NAME" | ||
node deploy/edgePublish.js | ||
calculate-hash: | ||
name: Calculate sha256 hashes | ||
env: | ||
|
@@ -355,7 +411,7 @@ jobs: | |
name: Build, package and publish mobile apps | ||
runs-on: macos-latest | ||
timeout-minutes: 30 | ||
if: vars.PUBLISH_REPO == '' && github.event_name != 'workflow_dispatch' | ||
if: github.event_name != 'workflow_dispatch' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
@@ -388,7 +444,7 @@ jobs: | |
STAKING_POOLS: ${{ vars.STAKING_POOLS }} | ||
PUBLISH_REPO: ${{ vars.PUBLISH_REPO }} | ||
run: | | ||
if [ "$GITHUB_REF_NAME" == "mobile-release" ]; then | ||
if [ "$PUBLISH_REPO" != "" ]; then | ||
npm run mobile:build:production | ||
else | ||
npm run mobile:build:staging | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Bug fixes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
const fs = require('fs'); | ||
|
||
const { | ||
EDGE_PRODUCT_ID, | ||
EDGE_CLIENT_ID, | ||
EDGE_CLIENT_SECRET, | ||
EDGE_ACCESS_TOKEN_URL, | ||
EDGE_FILE_PATH = './MyTonWallet-chrome.zip', | ||
EDGE_NOTES_PATH, | ||
} = process.env; | ||
|
||
if ( | ||
!EDGE_PRODUCT_ID | ||
|| !EDGE_CLIENT_ID | ||
|| !EDGE_CLIENT_SECRET | ||
|| !EDGE_ACCESS_TOKEN_URL | ||
|| !EDGE_FILE_PATH | ||
) { | ||
console.error('Missing env vars!') | ||
process.exit(1); | ||
} | ||
|
||
(async () => { | ||
const { EdgeAddonsAPI } = await import('@plasmohq/edge-addons-api'); | ||
|
||
const client = new EdgeAddonsAPI({ | ||
productId: EDGE_PRODUCT_ID, | ||
clientId: EDGE_CLIENT_ID, | ||
clientSecret: EDGE_CLIENT_SECRET, | ||
accessTokenUrl: EDGE_ACCESS_TOKEN_URL, | ||
}); | ||
|
||
let notes = undefined; | ||
if (EDGE_NOTES_PATH && await fs.promises.access(file, fs.constants.F_OK)) { | ||
notes = await fs.promises.readFile(EDGE_NOTES_PATH); | ||
} | ||
|
||
const operationId = await client.submit({ | ||
filePath: EDGE_FILE_PATH, | ||
notes, | ||
}); | ||
|
||
console.log('Publish operation ID:', operationId); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
VERSION=$(node -p "require('./package.json').version") | ||
DEFAULT_CHANGELOG="Bug fixes" | ||
|
||
echo $VERSION > public/version.txt | ||
|
||
echo $DEFAULT_CHANGELOG > changelogs/$VERSION.txt | ||
git add changelogs/$VERSION.txt | ||
|
||
git commit --amend --no-verify --no-edit public/version.txt changelogs/$VERSION.txt |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.17.0 | ||
1.17.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.17.4 | ||
1.17.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.