![dependabot[bot]](/assets/img/avatar_default.png)
Bumps the github-actions-updates group with 4 updates in the / directory: [actions/setup-node](https://github.com/actions/setup-node), [actions/download-artifact](https://github.com/actions/download-artifact), [mattermost/actions](https://github.com/mattermost/actions) and [actions/setup-python](https://github.com/actions/setup-python). Updates `actions/setup-node` from 4.3.0 to 4.4.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](cdca7365b2...49933ea528
) Updates `actions/download-artifact` from 4.2.1 to 4.3.0 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](95815c38cf...d3f86a106a
) Updates `mattermost/actions` from 746563b58e737a17a8ceb00b84a813b9e6e1b236 to 2620a83b059b7218192636361299aadde81ae243 - [Commits](746563b58e...2620a83b05
) Updates `actions/setup-python` from 5.5.0 to 5.6.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](8d9ed9ac5c...a26af69be9
) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: 4.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: actions/download-artifact dependency-version: 4.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: mattermost/actions dependency-version: 2620a83b059b7218192636361299aadde81ae243 dependency-type: direct:production dependency-group: github-actions-updates - dependency-name: actions/setup-python dependency-version: 5.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
188 lines
7.5 KiB
YAML
188 lines
7.5 KiB
YAML
name: build-for-pr
|
|
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- labeled
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
env:
|
|
TERM: xterm
|
|
|
|
jobs:
|
|
build-linux-for-pr:
|
|
runs-on: ubuntu-22.04
|
|
if: ${{ github.event.label.name == 'Build Apps for PR' }}
|
|
steps:
|
|
- name: ci/checkout-repo
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: ci/setup-node
|
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
with:
|
|
node-version-file: "package.json"
|
|
cache: "npm"
|
|
cache-dependency-path: package-lock.json
|
|
- name: ci/install-dependencies
|
|
env:
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
|
run: |
|
|
wget -qO - https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_22.04/Release.key | sudo apt-key add -
|
|
wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.20.1/yq_linux_amd64 && chmod a+x /usr/local/bin/yq
|
|
sudo apt-get update || true && sudo apt-get install -y ca-certificates libxtst-dev libpng++-dev gcc-aarch64-linux-gnu g++-aarch64-linux-gnu jq icnsutils graphicsmagick tzdata
|
|
npm ci
|
|
- name: ci/build
|
|
run: |
|
|
mkdir -p ./build/linux
|
|
npm run package:linux-tar
|
|
bash -x ./scripts/patch_updater_yml.sh
|
|
bash -x ./scripts/cp_artifacts.sh release ./build/linux
|
|
- name: ci/upload-build
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: build-linux
|
|
path: ./build/linux
|
|
retention-days: 10 ## No need to keep CI builds more than 10 days
|
|
|
|
windows-install-deps:
|
|
runs-on: windows-2022
|
|
if: ${{ github.event.label.name == 'Build Apps for PR' }}
|
|
steps:
|
|
- name: ci/checkout-repo
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: ci/setup-node
|
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
with:
|
|
node-version-file: "package.json"
|
|
cache: "npm"
|
|
cache-dependency-path: package-lock.json
|
|
- name: ci/cache-node-modules
|
|
id: cache-node-modules
|
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
|
with:
|
|
path: node_modules
|
|
key: ${{ runner.os }}-build-node-modules-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-build-node-modules
|
|
${{ runner.os }}-build-
|
|
${{ runner.os }}-
|
|
- name: ci/install-dependencies
|
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
env:
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
|
run: npm ci --openssl_fips=''
|
|
|
|
build-win-for-pr:
|
|
runs-on: windows-2022
|
|
if: ${{ github.event.label.name == 'Build Apps for PR' }}
|
|
needs:
|
|
- windows-install-deps
|
|
steps:
|
|
- name: ci/checkout-repo
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: ci/setup-node
|
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
with:
|
|
node-version-file: "package.json"
|
|
cache: "npm"
|
|
cache-dependency-path: package-lock.json
|
|
- name: ci/cache-node-modules
|
|
id: cache-node-modules
|
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
|
with:
|
|
path: node_modules
|
|
key: ${{ runner.os }}-build-node-modules-${{ hashFiles('package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-build-node-modules
|
|
${{ runner.os }}-build-
|
|
${{ runner.os }}-
|
|
- name: ci/install-node-gyp
|
|
env:
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
|
run: |
|
|
choco install yq --version 4.15.1 -y
|
|
npm i -g node-gyp
|
|
node-gyp install
|
|
node-gyp install --devdir="C:\Users\runneradmin\.electron-gyp" --target=$(jq -r .devDependencies.electron package.json) --dist-url="https://electronjs.org/headers"
|
|
node-gyp install --devdir="C:\Users\runneradmin\.electron-gyp" --target=$(jq -r .devDependencies.electron package.json) --dist-url="https://electronjs.org/headers" --arch arm64
|
|
- name: ci/install-dependencies
|
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
env:
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
|
run: |
|
|
npm ci --openssl_fips=''
|
|
- name: ci/build
|
|
env:
|
|
MM_WIN_INSTALLERS: 1
|
|
PFX_KEY: ${{ secrets.MM_DESKTOP_MSI_INSTALLER_PFX_KEY }}
|
|
CSC_KEY_PASSWORD: ${{ secrets.MM_DESKTOP_MSI_INSTALLER_CSC_KEY_PASSWORD }}
|
|
PFX: ${{ secrets.MM_DESKTOP_MSI_INSTALLER_PFX }}
|
|
CSC_LINK: ${{ secrets.MM_DESKTOP_MSI_INSTALLER_CSC_LINK }}
|
|
run: |
|
|
mkdir -p ./build/win
|
|
npm run package:windows
|
|
bash -x ./scripts/patch_updater_yml.sh
|
|
bash -x ./scripts/cp_artifacts.sh release ./build/win
|
|
- name: ci/upload-build
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: build-windows
|
|
path: ./build/win
|
|
retention-days: 10 ## No need to keep CI builds more than 10 days
|
|
|
|
build-mac-for-pr:
|
|
runs-on: macos-15
|
|
env:
|
|
MACOS_NOTIFICATION_STATE_NO_SDK_CHECK: true
|
|
if: ${{ github.event.label.name == 'Build Apps for PR' }}
|
|
steps:
|
|
- name: ci/checkout-repo
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: ci/setup-node
|
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
with:
|
|
node-version-file: "package.json"
|
|
cache: "npm"
|
|
cache-dependency-path: package-lock.json
|
|
- name: ci/install-dependencies
|
|
env:
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
|
run: |
|
|
brew install yq
|
|
jq '.mac.target=["zip"]' electron-builder.json | jq '.mac.gatekeeperAssess=false' > /tmp/electron-builder.json && cp /tmp/electron-builder.json .
|
|
sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
|
|
npm ci
|
|
- name: ci/build
|
|
env:
|
|
APPLE_API_KEY_ID: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_MACOS_API_KEY_ID }}
|
|
APPLE_API_KEY_RAW: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_MACOS_API_KEY }}
|
|
APPLE_API_KEY: "./key.p8"
|
|
APPLE_API_ISSUER: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_MACOS_API_ISSUER_ID }}
|
|
CSC_FOR_PULL_REQUEST: true
|
|
CSC_KEY_PASSWORD: ${{ secrets.MM_DESKTOP_MAC_INSTALLER_CSC_KEY_PASSWORD }}
|
|
CSC_LINK: ${{ secrets.MM_DESKTOP_MAC_INSTALLER_CSC_LINK }}
|
|
MAC_PROFILE: ${{ secrets.MM_DESKTOP_MAC_INSTALLER_DMG_PROFILE }}
|
|
run: |
|
|
echo $MAC_PROFILE | base64 -D > ./mac.provisionprofile
|
|
zsh -c 'echo -n $APPLE_API_KEY_RAW > ./key.p8'
|
|
mkdir -p ./build/macos
|
|
npm run package:mac
|
|
bash -x ./scripts/patch_updater_yml.sh
|
|
bash -x ./scripts/cp_artifacts.sh release ./build/macos/
|
|
- name: ci/upload-build
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: build-macos
|
|
path: ./build/macos/
|
|
retention-days: 10 ## No need to keep CI builds more than 10 days
|