mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-06 09:47:43 +02:00
EQMS-1548: TraceX desktop app (#9666)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
@@ -26,6 +26,7 @@ env:
|
||||
common
|
||||
desktop
|
||||
desktop-package
|
||||
qms-desktop-package
|
||||
dev
|
||||
models
|
||||
packages
|
||||
@@ -807,3 +808,108 @@ jobs:
|
||||
with:
|
||||
name: Huly-Linux
|
||||
path: ./desktop-package/deploy/Huly-linux-*.zip
|
||||
|
||||
qms-dist-build:
|
||||
# if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/s') }}
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/s') }}
|
||||
needs: build
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
filter: tree:0
|
||||
submodules: recursive
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: node
|
||||
with:
|
||||
path: |
|
||||
common/temp
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
|
||||
- name: Prepare .npmrc for GitHub Packages
|
||||
run: |
|
||||
echo "//npm.pkg.github.com/:_authToken=${{secrets.GITHUB_TOKEN}}" > ~/.npmrc
|
||||
|
||||
- name: Installing...
|
||||
run: node common/scripts/install-run-rush.js install --purge
|
||||
- name: Model version from git tags
|
||||
run: node common/scripts/install-run-rush.js model-version
|
||||
- name: Package
|
||||
run: node common/scripts/install-run-rush.js package --to qms-desktop -v
|
||||
- name: Package JSON
|
||||
run: |
|
||||
cd qms-desktop-package
|
||||
cat ./package.json
|
||||
- name: Install the Apple certificate and provisioning profile
|
||||
env:
|
||||
DEV_ID_P12_BASE64: ${{ secrets.DEV_ID_P12_BASE64 }}
|
||||
DEV_ID_P12_PASSWORD: ${{ secrets.DEV_ID_P12_PASSWORD }}
|
||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||||
run: |
|
||||
# create variables
|
||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
||||
|
||||
# import certificate from secret
|
||||
echo -n "$DEV_ID_P12_BASE64" | base64 --decode -o $CERTIFICATE_PATH
|
||||
|
||||
# create temporary keychain
|
||||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
|
||||
# import certificate to keychain
|
||||
security import $CERTIFICATE_PATH -P "$DEV_ID_P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
- name: Build distribution's
|
||||
env:
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
APPLE_ID_APP_PASS: ${{ secrets.APPLE_ID_APP_PASS }}
|
||||
TEAM_ID: ${{ secrets.TEAM_ID }}
|
||||
run: |
|
||||
cd qms-desktop-package
|
||||
node ../common/scripts/install-run-rushx.js dist --linux --x64
|
||||
node ../common/scripts/install-run-rushx.js dist --windows --x64 --arm64
|
||||
node ../common/scripts/install-run-rushx.js dist-signed --macos --x64 --arm64
|
||||
./scripts/copy-publish-artifacts.sh ${{ env.PublishTempFolder}}
|
||||
- name: Publish distribution assets and version
|
||||
uses: ryand56/r2-upload-action@latest
|
||||
with:
|
||||
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
|
||||
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
|
||||
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
||||
r2-bucket: desktop-distro
|
||||
source-dir: qms-desktop-package/${{ env.PublishTempFolder}}
|
||||
destination-dir: ./
|
||||
- name: Upload MacOS
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: TraceX-MacOS-x64
|
||||
path: ./qms-desktop-package/deploy/TraceX-macos-*-x64.dmg
|
||||
- name: Upload MacOS arm64
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: TraceX-MacOS-arm64
|
||||
path: ./qms-desktop-package/deploy/TraceX-macos-*-arm64.dmg
|
||||
- name: Upload Windows
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: TraceX-Windows
|
||||
path: ./qms-desktop-package/deploy/TraceX-windows-*.zip
|
||||
- name: Upload Linux
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: TraceX-Linux
|
||||
path: ./qms-desktop-package/deploy/TraceX-linux-*.zip
|
||||
Reference in New Issue
Block a user