Files
simplex-chat/.github/workflows/packages.yml
T
Evgeny @ SimpleX Chat f7f42e70e5 ci: reduced build on pushes to master and stable in forks (#7882)
* 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
2026-10-26 19:12:01 +00:00

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