chore(release): 6.50.0 #534
Workflow file for this run
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
name: Publish extensions | |
on: | |
push: | |
tags-ignore: | |
- 'v*beta*' | |
workflow_dispatch: | |
env: | |
COINBASE_APP_ID: ${{ secrets.COINBASE_APP_ID }} | |
MOONPAY_API_KEY: ${{ secrets.MOONPAY_API_KEY }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }} | |
TRANSAK_API_KEY: ${{ secrets.TRANSAK_API_KEY }} | |
BESTINSLOT_API_KEY: ${{ secrets.BESTINSLOT_API_KEY }} | |
BITFLOW_API_HOST: ${{ secrets.BITFLOW_API_HOST }} | |
BITFLOW_API_KEY: ${{ secrets.BITFLOW_API_KEY }} | |
BITFLOW_STACKS_API_HOST: ${{ secrets.BITFLOW_STACKS_API_HOST }} | |
BITFLOW_READONLY_CALL_API_HOST: ${{ secrets.BITFLOW_READONLY_CALL_API_HOST }} | |
WALLET_ENVIRONMENT: production | |
IS_PUBLISHING: true | |
jobs: | |
extract-version: | |
runs-on: ubuntu-latest | |
outputs: | |
new_version: ${{ steps.extract_version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Extract version | |
id: extract_version | |
uses: Saionaro/[email protected] | |
- name: Print version | |
run: echo ${{ steps.extract_version.outputs.version }} | |
publish-chrome-extension: | |
name: Publish Chrome extension | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: | |
- extract-version | |
outputs: | |
publish_status: ${{ steps.publish-chrome.outputs.publish_status }} | |
env: | |
TARGET_BROWSER: chromium | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/provision | |
- name: Build project | |
env: | |
# We only add the sentry auth token for chrome, as we don't want to | |
# create a duplicate release during the ff build | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
run: pnpm build | |
- uses: actions/upload-artifact@v3 | |
name: Upload build artifact | |
with: | |
name: leather-chromium-v${{ needs.extract-version.outputs.new_version }} | |
path: dist | |
- name: Build extension | |
run: sh build-ext.sh | |
- name: Sign and Upload Production Chrome extension | |
continue-on-error: true | |
id: publish-chrome | |
run: | | |
pnpm chrome-webstore-upload upload --auto-publish --source leather-chromium.zip | |
echo "::set-output name=publish_status::${?}" | |
env: | |
EXTENSION_ID: ${{ secrets.CHROME_APP_ID }} | |
CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }} | |
CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }} | |
REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }} | |
publish-firefox-extension: | |
name: Publish Firefox extension | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
env: | |
TARGET_BROWSER: firefox | |
needs: | |
- extract-version | |
outputs: | |
publish_status: ${{ steps.publish-firefox.outputs.publish_status }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/provision | |
- name: Build project | |
run: pnpm build | |
- uses: actions/upload-artifact@v3 | |
name: Upload build artifact | |
with: | |
name: leather-firefox-v${{ needs.extract-version.outputs.new_version }} | |
path: dist | |
- name: Sign and Upload Production Firefox extension | |
continue-on-error: true | |
id: publish-firefox | |
run: | | |
pnpm web-ext-submit --channel listed --artifacts-dir dist | |
echo "::set-output name=publish_status::${?}" | |
env: | |
WEB_EXT_API_KEY: ${{ secrets.FIREFOX_API_KEY }} | |
WEB_EXT_API_SECRET: ${{ secrets.FIREFOX_API_SECRET }} | |
create-github-release: | |
name: Create Github release | |
runs-on: ubuntu-latest | |
needs: | |
- extract-version | |
- publish-chrome-extension | |
- publish-firefox-extension | |
steps: | |
- name: Download extension build | |
uses: actions/download-artifact@v3 | |
with: | |
path: . | |
- name: Download release-notes.txt from create-version workflow | |
uses: dawidd6/action-download-artifact@v6 | |
with: | |
workflow: create-version.yml | |
name: release-notes | |
allow_forks: false | |
- name: Zip Firefox build | |
run: zip -r leather-firefox.v${{ needs.extract-version.outputs.new_version }}.zip leather-firefox-v${{ needs.extract-version.outputs.new_version }} | |
- name: Zip Chromium build | |
run: zip -r leather-chromium.v${{ needs.extract-version.outputs.new_version }}.zip leather-chromium-v${{ needs.extract-version.outputs.new_version }} | |
- run: ls -la . | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
prerelease: false | |
tag_name: v${{ needs.extract-version.outputs.new_version }} | |
body_path: release-notes.txt | |
files: | | |
leather-chromium.v${{ needs.extract-version.outputs.new_version }}.zip | |
leather-firefox.v${{ needs.extract-version.outputs.new_version }}.zip | |
post_run: | |
runs-on: ubuntu-latest | |
needs: | |
- publish-chrome-extension | |
- publish-firefox-extension | |
steps: | |
- name: Publish Statuses | |
run: | | |
echo "::warning::Firefox Publish Status: $([[ "${{ needs.publish-firefox-extension.outputs.publish_status }}" = "0" ]] && echo 'SUCCESS' || echo 'FAILED')" | |
echo "::warning::Chrome Publish Status: $([[ "${{ needs.publish-chrome-extension.outputs.publish_status }}" = "0" ]] && echo 'SUCCESS' || echo 'FAILED')" |