diff --git a/.github/workflows/tag_macos.yaml b/.github/workflows/tag_macos.yaml new file mode 100644 index 000000000..f7306977e --- /dev/null +++ b/.github/workflows/tag_macos.yaml @@ -0,0 +1,64 @@ +name: Tag release macos-x64 + +on: + push: + branches: + - dev + tags: + - '*' + +env: + SERVER: production + +defaults: + run: + shell: bash + working-directory: webstack/clients/electron + +jobs: + run: + runs-on: macos-12 + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-node@v3 + with: + node-version: '18' + - name: Install + run: yarn install --frozen-lockfile --silent + - name: Packager + run: npx electron-packager ./ --platform=darwin --arch=x64 --icon=s3.icns --overwrite + - name: Cleanup + run: | + rm -fr SAGE3-darwin-x64/SAGE3.app/Contents/Resources/app/node_modules/electron-installer* + rm -fr SAGE3-darwin-x64/SAGE3.app/Contents/Resources/app/node_modules/electron-winstaller* + rm -fr SAGE3-darwin-x64/SAGE3.app/Contents/Resources/app/node_modules/appdmg + - name: Sign + env: + MACOS_CERTIFICATE: ${{ secrets.LUC_DEV_CERTIFICATE }} + MACOS_CERTIFICATE_PWD: ${{ secrets.LUC_DEV_CERTIFICATE_PASS }} + APPLE_ID: ${{ secrets.LUC_APPLE_ID }} + APPLE_ID_PWD: ${{ secrets.LUC_APPLE_ID_PWD }} + APPLE_TEAM_ID: ${{ secrets.LUC_APPLE_TEAM_ID }} + run: | + echo $MACOS_CERTIFICATE | base64 -d > certificate.p12 + security create-keychain -p blabla123 build.keychain + security default-keychain -s build.keychain + security unlock-keychain -p blabla123 build.keychain + security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign + security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k blabla123 build.keychain + #/usr/bin/codesign --force --deep -s 1B03EB588B2B36D12500F0B9B5D1F0C131060E33 SAGE3-darwin-x64/SAGE3.app -v + # Sign + npx electron-osx-sign --type=development --signature-flags=library --hardened-runtime --entitlements=entitlements.mac.plist --entitlements-inherit=entitlements.mac.plist SAGE3-darwin-x64/SAGE3.app + node notarize.js + - name: Zip app folder + run: | + cd SAGE3-darwin-x64 + zip -y -r auto-update-sage3-darwin-x64.zip SAGE3.app + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: webstack/clients/electron/SAGE3-darwin-x64/auto-update-sage3-darwin-x64.zip