Beta Deployment #52
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: Beta Deployment | |
on: | |
workflow_dispatch: | |
inputs: | |
release: | |
description: Release Number | |
default: "2.0.0" | |
required: true | |
version: | |
description: Beta version | |
default: "0" | |
required: true | |
jobs: | |
bump-version: | |
name: Bump Package Version and Submit Extension | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: release/${{ github.event.inputs.release }} | |
- name: Update manifest-v2.json name | |
uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 | |
with: | |
file: ./extension/public/static/manifest/v2.json | |
field: name | |
value: Freighter BETA | |
- name: Update manifest-v3.json name | |
uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 | |
with: | |
file: ./extension/public/static/manifest/v3.json | |
field: name | |
value: Freighter BETA | |
- name: Update manifest-v2.json version_name | |
uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 | |
with: | |
file: ./extension/public/static/manifest/v2.json | |
field: version_name | |
value: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} | |
- name: Update manifest-v3.json version_name | |
uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 | |
with: | |
file: ./extension/public/static/manifest/v3.json | |
field: version_name | |
value: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} | |
- name: Update manifest-v2.json version for Chrome | |
uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 | |
with: | |
file: ./extension/public/static/manifest/v2.json | |
field: version | |
value: ${{ github.event.inputs.release }}.${{ github.event.inputs.version }} | |
- name: Update manifest-v3.json version for Chrome | |
uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 | |
with: | |
file: ./extension/public/static/manifest/v3.json | |
field: version | |
value: ${{ github.event.inputs.release }}.${{ github.event.inputs.version }} | |
- name: Build extension | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "18" | |
- run: yarn setup && yarn build:freighter-api && yarn build:extension:production | |
- name: Use BETA icons | |
run: | | |
rm -rf ./extension/build/images | |
mv ./extension/build/beta_images ./extension/build/images | |
- name: Install zip | |
uses: montudor/action-zip@c25e01d7489d0274569440a2f0281b4569df16bc #v0.1.1 | |
- name: Zip extension build | |
run: zip -qq -r ./build.zip * | |
working-directory: ./extension/build | |
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
tag_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} | |
release_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} | |
body: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} | |
draft: false | |
prerelease: true | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./extension/build/build.zip | |
asset_name: build-${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.zip | |
asset_content_type: application/zip | |
# - name: | |
- name: Submit extension to Chrome | |
uses: ./.github/actions/chrome-extension-upload | |
with: | |
file-path: ./extension/build/build.zip | |
extension-id: "kcigoalhjaghfigblagmiopnefgenfjb" | |
client-id: ${{ secrets.EXTENSION_CLIENT_ID }} | |
client-secret: ${{ secrets.EXTENSION_CLIENT_SECRET }} | |
refresh-token: ${{ secrets.EXTENSION_REFRESH_TOKEN }} | |
publish: true | |
publish-target: trustedTesters | |
- name: Slack Notification | |
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 #v2.2.0 | |
env: | |
MSG_MINIMAL: true | |
SLACK_CHANNEL: proj-freighter | |
SLACK_COLOR: "#391EDA" | |
SLACK_ICON: https://github.com/stellar/freighter/blob/master/docs/static/images/logo.png?size=48 | |
SLACK_MESSAGE: "https://github.com/stellar/freighter/releases/tag/{{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}" | |
SLACK_TITLE: Freighter v${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} has been submitted for testing! | |
SLACK_USERNAME: Freighter Administrative Assistant | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |