mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-04 19:27:55 +00:00
* ci: reduced build on pushes to master and stable in forks * ci: test retry message only when retrying * ci: pull request changes against the current base * ci: deploy the website only from simplex-chat/simplex-chat
73 lines
1.9 KiB
YAML
73 lines
1.9 KiB
YAML
name: packages
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "packages/simplex-chat-nodejs/**"
|
|
- "packages/simplex-chat-client/types/typescript/**"
|
|
- "packages/simplex-chat-python/**"
|
|
- ".github/workflows/packages.yml"
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
|
|
concurrency:
|
|
# build.yml and this workflow both run for a pull request that changes the core and the packages
|
|
group: ${{ github.workflow }}-packages-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
NPM_SCOPE: ${{ vars.NPM_SCOPE }}
|
|
PYPI_PROJECT: ${{ vars.PYPI_PROJECT }}
|
|
PYPI_URL: ${{ vars.PYPI_URL }}
|
|
|
|
jobs:
|
|
addon:
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
platforms: ${{ steps.plan.outputs.platforms }}
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- name: Build plan
|
|
id: plan
|
|
run: python3 scripts/ci/packages_release.py build-plan --base HEAD^1 >> "$GITHUB_OUTPUT"
|
|
|
|
build:
|
|
name: "build ${{ matrix.platform }}"
|
|
needs: addon
|
|
if: needs.addon.outputs.platforms != '[]'
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include: ${{ fromJSON(needs.addon.outputs.platforms) }}
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v7
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Build simplex-chat (npm) and add-on
|
|
run: scripts/ci/package-tests.sh build ${{ matrix.platform }}
|
|
|
|
- name: Test simplex-chat (npm and PyPI)
|
|
run: scripts/ci/package-tests.sh test
|