From 5c527dc47d34305e8332aa7085cc679f02593770 Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Tue, 26 May 2020 02:01:27 +0800 Subject: [PATCH] Add packagecore packaging workflow --- .../workflows/build-and-upload-artifacts.yml | 32 +++++++ packagecore.yaml | 88 +++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 .github/workflows/build-and-upload-artifacts.yml create mode 100644 packagecore.yaml diff --git a/.github/workflows/build-and-upload-artifacts.yml b/.github/workflows/build-and-upload-artifacts.yml new file mode 100644 index 0000000..6d32495 --- /dev/null +++ b/.github/workflows/build-and-upload-artifacts.yml @@ -0,0 +1,32 @@ +name: build and upload artifacts +on: + push: + tags: + - "v*" +jobs: + build-and-upload-artifacts: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Install PackageCore + run: | + python -m pip install --upgrade pip + pip install packagecore + - name: Build artifacts with PackageCore + run: | + version=${GITHUB_REF##*/v} + packagecore -o dist/ "$version" + - name: Create draft release with artifacts + run: | + tag=${GITHUB_REF##*/} + asset_options=() + for asset in dist/*; do + asset_options+=(-a "$asset") + done + hub release create --draft "${asset_options[@]}" --message "googler $tag" "$tag" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/packagecore.yaml b/packagecore.yaml new file mode 100644 index 0000000..f42b49b --- /dev/null +++ b/packagecore.yaml @@ -0,0 +1,88 @@ +name: googler +maintainer: Arun Prakash Jana +license: GPLv3 +summary: Google from the command-line. +homepage: https://github.com/jarun/googler +commands: + install: + - make PREFIX="/usr" install DESTDIR="${BP_DESTDIR}" +packages: + archlinux: + builddeps: + - make + deps: + - python + container: "archlinux/base" + centos7.5: + builddeps: + - make + deps: + - python + centos7.6: + builddeps: + - make + deps: + - python + centos7.7: + builddeps: + - make + deps: + - python + centos8.0: + builddeps: + - make + deps: + - python3 + commands: + precompile: + - dnf install python3 + debian8: + builddeps: + - make + deps: + - python3 + debian9: + builddeps: + - make + deps: + - python3 + debian10: + builddeps: + - make + deps: + - python3 + fedora30: + builddeps: + - make + deps: + - python3 + fedora31: + builddeps: + - make + deps: + - python3 + opensuse15.1: + builddeps: + - make + deps: + - python3 + ubuntu14.04: + builddeps: + - make + deps: + - python3 + ubuntu16.04: + builddeps: + - make + deps: + - python3 + ubuntu18.04: + builddeps: + - make + deps: + - python3 + ubuntu20.04: + builddeps: + - make + deps: + - python3