diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..02ccb47 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,147 @@ +name: Build and Distribute + +on: + pull_request: + push: + branches: + - release + - master + paths: + - "**" + - "!debian/changelog" + workflow_dispatch: + +concurrency: + group: ${{ github.head_ref || github.ref }} + +jobs: + build_deb: + name: 'Build DEB' + uses: signalwire/actions-template/.github/workflows/ci-deb-packages-v2.yml@main + strategy: + fail-fast: false + matrix: + codename: + - bookworm + - bullseye + - buster + - stretch + platform: + - amd64 + - armhf + with: + PROJECT_NAME: libsilk + RUNNER: ubuntu-latest + BASE_IMAGE: signalwire/build-deb-action + DISTRO_CODENAME: ${{ matrix.codename }} + PLATFORM: ${{ matrix.platform }} + + generate_meta_deb: + if: (github.ref_type == 'branch' && github.base_ref == '') + name: 'Meta DEB' + needs: [ build_deb ] + strategy: + matrix: + os: + - deb + codename: + - bookworm + - bullseye + - buster + - stretch + platform: + - amd64 + - armhf + uses: signalwire/actions-template/.github/workflows/ci-libs-metadata-v2.yml@main + with: + ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }}-artifact + OS_PLATFORM: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }} + RUNNER: ubuntu-latest + FILE_PATH_PREFIX: /var/www/libsilk-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }} + + distribute_matrix_deb: + if: (github.ref_type == 'branch' && github.base_ref == '') + permissions: write-all + name: 'Copy to remote DEB' + needs: [ build_deb ] + strategy: + matrix: + os: + - deb + codename: + - bookworm + - bullseye + - buster + - stretch + platform: + - amd64 + - armhf + uses: signalwire/actions-template/.github/workflows/cd-scp.yml@main + with: + ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }}-artifact + TARGET_FOLDER: /var/www/libsilk-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }} + RUNNER: ubuntu-latest + FILES: '*.tar.gz' + CREATE_DESTINATION_FOLDERS: true + secrets: + # Explicit define secrets for better understanding but it could be just inherit + PROXY_URL: ${{ secrets.PROXY_URL }} + USERNAME: ${{ secrets.USERNAME }} + HOSTNAME: ${{ secrets.HOSTNAME }} + TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }} + + distribute_meta_deb: + if: (github.ref_type == 'branch' && github.base_ref == '') + permissions: write-all + name: 'Copy meta to remote DEB' + needs: [ generate_meta_deb ] + strategy: + max-parallel: 1 + matrix: + os: + - deb + codename: + - bookworm + - bullseye + - buster + - stretch + platform: + - amd64 + - armhf + uses: signalwire/actions-template/.github/workflows/cd-libs-metadata.yml@main + with: + ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }}-meta + LIB_NAME: libsilk + SOURCE_BRANCH: ${{ github.ref_name }} + TARGET_OS: ${{ matrix.os }} + TARGET_PLATFORM: ${{ matrix.platform }} + RUNNER: ubuntu-latest + TARGET_REPO: signalwire/bamboo_gha_trigger + secrets: + GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }} + concurrency: + group: libsilk-${{ matrix.os }}-${{ matrix.platform }} + cancel-in-progress: true + + distribute_hash_deb: + if: (github.ref_type == 'branch' && github.base_ref == '') + permissions: write-all + name: 'Copy hash to remote DEB' + needs: [ distribute_meta_deb ] + uses: signalwire/actions-template/.github/workflows/cd-scp.yml@main + strategy: + matrix: + os: + - deb + platform: + - amd64 + - armhf + with: + RUNNER: ubuntu-latest + CREATE_DESTINATION_FOLDERS: false + EXEC_COMMANDS: 'echo "${{ github.sha }}" > /var/www/libsilk-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}/hash.txt' + secrets: + PROXY_URL: ${{ secrets.PROXY_URL }} + USERNAME: ${{ secrets.USERNAME }} + HOSTNAME: ${{ secrets.HOSTNAME }} + TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }} diff --git a/debian/changelog b/debian/changelog index ad1709b..25c9ba5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,4 @@ -libsilk (1.0.9-999~u1) unstable; urgency=low - - * Update version release - - -- FreeSWITCH Solutions Fri, 09 Feb 2018 12:50:30 +0200 - -libsilk (1.0.9~1) unstable; urgency=low +libsilk (1.0.9) unstable; urgency=low * Initial release diff --git a/debian/rules b/debian/rules index 38f427e..73babaf 100755 --- a/debian/rules +++ b/debian/rules @@ -2,11 +2,11 @@ # -*- makefile -*- # get debian distribution codename -DISTRIBUTION=$(shell lsb_release -sc) +#DISTRIBUTION=$(shell lsb_release -sc) # get version from changelog, for string mangling -VERSION=$(shell dpkg-parsechangelog --count 1 --show-field Version) +#VERSION=$(shell dpkg-parsechangelog --count 1 --show-field Version) # add distribution codename to package version -PACKAGEVERSION=$(subst ~,~$(DISTRIBUTION)-,$(VERSION)) +#PACKAGEVERSION=$(subst ~,~$(DISTRIBUTION)-,$(VERSION)) export DH_VERBOSE=1 @@ -24,5 +24,5 @@ override_dh_auto_configure: --libexecdir=/usr/lib # setting mangled package version -override_dh_gencontrol: - dh_gencontrol -- -v$(PACKAGEVERSION) +#override_dh_gencontrol: +# dh_gencontrol -- -v$(PACKAGEVERSION)