Update contribution link (#817) #569
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: "deploy" | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_desktop: | |
strategy: | |
matrix: | |
platform: | |
# X86+64 is built with ARM64 also | |
- darwin+aarch64 | |
uses: ./.github/workflows/build-sign-notarize.yml | |
with: | |
platform: ${{ matrix.platform }} | |
s3-prefix: main | |
debug: 1 | |
sync-translation: 1 | |
secrets: inherit | |
upload: | |
needs: [build_desktop] | |
if: needs.build_desktop.outputs.s3-electron-dist-key != '' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: | |
# - linux+x86-64 | |
- darwin+aarch64 | |
# - linux+aarch64 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: s3 artifact download | |
env: | |
S3_INSTALLER_KEY: ${{ secrets.BUILDS_S3_BUCKET }}/${{ needs.build_desktop.outputs.s3-electron-dist-key }} | |
run: aws s3 cp $S3_INSTALLER_KEY dist.tgz | |
- run: | | |
mkdir dist | |
tar xzf dist.tgz -C dist | |
- name: get installer filenames of arm64 and x86+64 | |
id: app_files | |
working-directory: ./dist | |
run: | | |
ARM64_ZIP=$(ls | grep -Ev blockmap | grep arm64-mac.zip) | |
X86_ZIP=$(ls | grep -Ev blockmap | grep -Ev arm64 | grep mac.zip) | |
ARM64_DMG=$(ls | grep -Ev blockmap | grep arm64.dmg) | |
X86_DMG=$(ls | grep -Ev blockmap | grep -Ev arm64 | grep dmg) | |
echo zip_arm64=$ARM64_ZIP >> $GITHUB_OUTPUT | |
echo zip_x86=$X86_ZIP >> $GITHUB_OUTPUT | |
echo dmg_arm64=$ARM64_DMG >> $GITHUB_OUTPUT | |
echo dmg_x86=$X86_DMG >> $GITHUB_OUTPUT | |
- name: Get current unix ts - seconds | |
id: date | |
run: echo "unix_seconds=$(date +'%s')" >> $GITHUB_OUTPUT | |
- name: build platform output | |
id: build_platform | |
env: | |
platform: ${{ matrix.platform }} | |
run: | | |
BUILD_PLATFORM=$(echo $platform | sed -e "s/darwin+//g" | sed -e "s/linux+//g") | |
EXTENSION=dmg | |
case $platform in | |
"linux+x86-64") | |
BUILD_PLATFORM="amd64" | |
EXTENSION="deb" | |
;; | |
"linux+aarch64") | |
BUILD_PLATFORM="aarch64" | |
EXTENSION="deb" | |
;; | |
"darwin+aarch64") | |
BUILD_PLATFORM="aarch64" | |
EXTENSION="dmg" | |
;; | |
"darwin+x86-64") | |
BUILD_PLATFORM="x64" | |
EXTENSION="dmg" | |
;; | |
*) | |
echo "Unknown platform $platform" | |
exit 1 | |
;; | |
esac | |
echo "build_platform=$BUILD_PLATFORM" >> $GITHUB_OUTPUT | |
echo "extension=$EXTENSION" >> $GITHUB_OUTPUT | |
- name: cp package images from prod to gui bucket | |
env: | |
arm64: ${{ steps.app_files.outputs.dmg_arm64 }} | |
x86: ${{ steps.app_files.outputs.dmg_x86 }} | |
bucket: ${{ secrets.BUILDS_S3_BUCKET }} | |
run: | | |
cd dist && \ | |
aws s3 sync . "$bucket/dev/" | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: get version | |
id: get-version | |
run: | | |
echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
- name: Slack Notification ARM64 | |
run: ./.github/notify-slack.js | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
PLATFORM: darwin-aarch64 | |
EXT: dmg | |
VERSION: ${{ steps.get-version.outputs.version }}-dev | |
DOWNLOAD_URL: ${{ secrets.BUILDS_S3_PUBLIC_DOMAIN }}/dev/${{ steps.app_files.outputs.dmg_arm64 }} | |
- name: Slack Notification X86 | |
run: ./.github/notify-slack.js | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
PLATFORM: darwin-x86+64 | |
EXT: dmg | |
VERSION: ${{ steps.get-version.outputs.version }}-dev | |
DOWNLOAD_URL: ${{ secrets.BUILDS_S3_PUBLIC_DOMAIN }}/dev/${{ steps.app_files.outputs.dmg_x86 }} | |
- run: | | |
aws cloudfront create-invalidation \ | |
--distribution-id ${{ secrets.AWS_CF_GUI_RELEASE_ID }} \ | |
--paths '/*' |