From c912af176bf54233453ca9fe5dcc1a4955fe8150 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 5 Nov 2020 19:36:54 +0100 Subject: [PATCH] Adding initial version of packaging test --- .github/workflows/packaging_test.yml | 38 ++++++++++++++++++++++++++++ .github/workflows/release.yml | 38 ++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 .github/workflows/packaging_test.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/packaging_test.yml b/.github/workflows/packaging_test.yml new file mode 100644 index 0000000..f95cc2b --- /dev/null +++ b/.github/workflows/packaging_test.yml @@ -0,0 +1,38 @@ +name: Packaging Test + +on: + push: + branches: + - $default-branch + - development + - master + # Run tests for any PRs + pull_request: + +env: + SOURCE_DIR: ./ + ARTIFACTS_DIR: debian/build/release/ + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + env: + DEBIAN_FRONTEND: "noninteractive" + - name: Remove github artefacts + run: | + rm -rf .github/ + - name: Adjust distibution in changelog file + run: | + sed -i '0,/restricted/s//stable/' debian/changelog + - name: Build Debian package + uses: dawidd6/action-debian-package@v1 +# uses: pi-top/action-debian-package@v4 + with: +# source_directory: "${SOURCE_DIR}" +# artifacts_directory: "${ARTIFACTS_DIR}" + artifacts_directory: debian/build/release/ +# target_architectures: "amd64,i386" +# distribution: 'stable' +# os: 'debian' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..58dfdd7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Build Packages + +on: + release: + types: [published, created, edited] + # Run tests for any PRs +# pull_request: + +env: + SOURCE_DIR: ./ + ARTIFACTS_DIR: debian/build/release/ + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + env: + DEBIAN_FRONTEND: "noninteractive" + - name: Remove github artefacts + run: | + rm -rf .github/ + - name: Adjust distibution in changelog file + run: | + sed -i '0,/restricted/s//stable/' debian/changelog + - name: Build Debian package + uses: pi-top/action-debian-package@v4 + with: + artifacts_directory: debian/build/release/ + target_architectures: "amd64,i386" + - name: Upload the artifacts + uses: skx/github-action-publish-binaries@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: +# releaseId: 'debian/18.20201012+4' +# releaseId: ${{ needs.create_release.outputs.id }} + args: debian/build/release/*