mirror of https://github.com/watcha-fr/synapse
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.7 KiB
65 lines
1.7 KiB
3 years ago
|
# GitHub actions workflow which builds the release artifacts.
|
||
3 years ago
|
|
||
3 years ago
|
name: Build release artifacts
|
||
3 years ago
|
|
||
|
on:
|
||
|
push:
|
||
3 years ago
|
# we build on develop and release branches to (hopefully) get early warning
|
||
|
# of things breaking
|
||
3 years ago
|
branches: ["develop", "release-*"]
|
||
|
|
||
3 years ago
|
# we also rebuild on tags, so that we can be sure of picking the artifacts
|
||
|
# from the right tag.
|
||
|
tags: ["v*"]
|
||
|
|
||
3 years ago
|
permissions:
|
||
|
contents: read
|
||
|
|
||
|
jobs:
|
||
|
# first get the list of distros to build for.
|
||
|
get-distros:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- uses: actions/setup-python@v2
|
||
|
- id: set-distros
|
||
|
run: |
|
||
|
echo "::set-output name=distros::$(scripts-dev/build_debian_packages --show-dists-json)"
|
||
|
# map the step outputs to job outputs
|
||
|
outputs:
|
||
|
distros: ${{ steps.set-distros.outputs.distros }}
|
||
|
|
||
|
# now build the packages with a matrix build.
|
||
|
build-debs:
|
||
|
needs: get-distros
|
||
|
name: "Build .deb packages"
|
||
|
runs-on: ubuntu-latest
|
||
|
strategy:
|
||
|
matrix:
|
||
|
distro: ${{ fromJson(needs.get-distros.outputs.distros) }}
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
with:
|
||
|
path: src
|
||
|
- uses: actions/setup-python@v2
|
||
|
- run: ./src/scripts-dev/build_debian_packages "${{ matrix.distro }}"
|
||
|
- uses: actions/upload-artifact@v2
|
||
|
with:
|
||
3 years ago
|
name: debs
|
||
3 years ago
|
path: debs/*
|
||
3 years ago
|
|
||
|
build-sdist:
|
||
|
name: "Build pypi distribution files"
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- uses: actions/setup-python@v2
|
||
|
- run: pip install wheel
|
||
|
- run: |
|
||
|
python setup.py sdist bdist_wheel
|
||
|
- uses: actions/upload-artifact@v2
|
||
|
with:
|
||
|
name: python-dist
|
||
|
path: dist/*
|