From ae81ec428d4fc0600b5cc06df2c2b8cb696d43c9 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 13 Jul 2021 00:20:11 +0100 Subject: Build the python release artifacts in GHA too --- .github/workflows/debs.yml | 44 ----------------------- .github/workflows/release-artifacts.yml | 64 +++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/debs.yml create mode 100644 .github/workflows/release-artifacts.yml (limited to '.github/workflows') diff --git a/.github/workflows/debs.yml b/.github/workflows/debs.yml deleted file mode 100644 index e03a419426..0000000000 --- a/.github/workflows/debs.yml +++ /dev/null @@ -1,44 +0,0 @@ -# GitHub actions workflow which builds the debian packages. - -name: Debs - -on: - push: - branches: ["develop", "release-*"] - -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: - name: packages - path: debs/* diff --git a/.github/workflows/release-artifacts.yml b/.github/workflows/release-artifacts.yml new file mode 100644 index 0000000000..9d1fb89834 --- /dev/null +++ b/.github/workflows/release-artifacts.yml @@ -0,0 +1,64 @@ +# GitHub actions workflow which builds the release artifacts. + +name: Build release artifacts + +on: + push: + # we build on develop and release branches to (hopefully) get early warning + # of things breaking + branches: ["develop", "release-*"] + + # we also rebuild on tags, so that we can be sure of picking the artifacts + # from the right tag. + tags: ["v*"] + +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: + name: debs + path: debs/* + + 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/* -- cgit 1.4.1