From 3ad318bc29abd8f3b1e0c96c90f66ecf7f428532 Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Wed, 10 Apr 2024 23:47:51 +0100 Subject: [PATCH] CI: Build only for 3.11 and upload release. --- .github/workflows/build.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 331dba3..8dac92a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,8 @@ on: push: branches: - main + release: + types: [created] jobs: test: @@ -46,13 +48,27 @@ jobs: path: ${{ github.workspace }}/rpipins/dist/ - name: Build Debian Package + if: matrix.python == '3.11' working-directory: rpipins run: | + echo "DEB_VERSION=`hatchling version`" >> "$GITHUB_ENV" make deb-deps make deb - name: Upload Debian Package + if: matrix.python == '3.11' uses: actions/upload-artifact@v4 with: - name: ${{ env.RELEASE_FILE }} (deb) - path: ${{ github.workspace }}/*.deb + name: rpipins_${{ env.DEB_VERSION }}_all.deb + path: ${{ github.workspace }}/rpipins_${{ env.DEB_VERSION }}_all.deb + + - name: Upload Debian Package + if: github.event_name == 'release' && matrix.python == '3.11' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + asset_path: ${{ github.workspace }}/rpipins_${{ env.DEB_VERSION }}_all.deb + upload_url: ${{ github.event.release.upload_url }} + asset_name: rpipins_${{ env.DEB_VERSION }}_all.deb + asset_content_type: application/octet-stream