diff --git a/.github/workflows/distribute-zboxcli.yml b/.github/workflows/distribute-zboxcli.yml index c8772a58..4ef01ae6 100644 --- a/.github/workflows/distribute-zboxcli.yml +++ b/.github/workflows/distribute-zboxcli.yml @@ -186,28 +186,35 @@ jobs: - name: Copy debian packages run : | - mkdir -p ${{ env.REPO_DIR }}/pool/main/z/${APP_NAME}/ + mkdir -p ${{ env.REPO_DIR }}/pool/main/z/${{ env.APP_NAME }}/ find ${{ env.DEB_DIR }} -name "*.deb" for deb in $(find ${{ env.DEB_DIR }} -name "*.deb"); do - cp $deb ${{ env.REPO_DIR }}/pool/main/z/${APP_NAME}/ + cp $deb ${{ env.REPO_DIR }}/pool/main/z/${{ env.APP_NAME }}/ done - name: Update APT repo run: | cd ${{ env.REPO_DIR }} for dist in ${{ env.DISTRIBUTIONS }}; do + mkdir -p dists/${dist} + for arch in ${{ env.ARCHITECTURES }}; do + mkdir -p dists/${dist}/main/binary-${arch} + find "${{ env.REPO_DIR }}/pool/main/z/${{ env.APP_NAME }}" -type f -name "${{ env.APP_NAME }}_*~${dist}_${arch}.deb" | \ + xargs -I {} apt-ftparchive -o Tree::dists/${dist}::Sections="main" \ + -o Tree::dists/${dist}::Architectures="${arch}" \ + -o Dir::ArchiveDir="${{ env.REPO_DIR }}" \ + packages {} > dists/${dist}/main/binary-${arch}/Packages + done + apt-ftparchive -o APT::FTPArchive::Release::Origin="${{ env.APP_NAME }}" \ - -o APT::FTPArchive::Release::Label="${{ env.APP_NAME }}" \ - -o APT::FTPArchive::Release::Suite="${dist}" \ - -o APT::FTPArchive::Release::Codename="${dist}" \ - -o APT::FTPArchive::Release::Version="${{ env.APP_VERSION }}" \ - -o APT::FTPArchive::Release::Architectures="${{ env.ARCHITECTURES }}" \ - -o APT::FTPArchive::Release::Components="main" \ - -o Tree::dists/${dist}::Sections="main" \ - -o Tree::dists/${dist}::Architectures="${{ env.ARCHITECTURES }}" \ - -o Dir::ArchiveDir="${{ env.REPO_DIR }}" \ - packages pool/main override-file \ - release dists/${dist} + -o APT::FTPArchive::Release::Label="${{ env.APP_NAME }}" \ + -o APT::FTPArchive::Release::Suite="${dist}" \ + -o APT::FTPArchive::Release::Codename="${dist}" \ + -o APT::FTPArchive::Release::Version="${{ env.APP_VERSION }}" \ + -o APT::FTPArchive::Release::Architectures="${{ env.ARCHITECTURES }}" \ + -o APT::FTPArchive::Release::Components="main" \ + -o Dir::ArchiveDir="${{ env.REPO_DIR }}" \ + release dists/${dist} > dists/${dist}/Release echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --default-key ${{ secrets.GPG_KEY_ID }} --batch --yes --passphrase-fd 0 -abs -o dists/${dist}/Release.gpg dists/${dist}/Release echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --default-key ${{ secrets.GPG_KEY_ID }} --batch --yes --passphrase-fd 0 --clearsign -o dists/${dist}/InRelease dists/${dist}/Release diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 660c065c..3e10f01f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,6 @@ name: Release on: - push: # remove push once tested + push: # REMOVE: push once tested branches: - packaging workflow_dispatch: @@ -12,7 +12,7 @@ on: env: GITHUB_TOKEN: ${{ secrets.GOSDK }} - VERSION: 1.16.0 # take as input from workflow + VERSION: 1.16.0 # REMOVE: take as input from workflow APP_NAME: zbox GO_VERSION: 1.21 diff --git a/scripts/debian/install.sh b/scripts/debian/install.sh index c9321e9c..0c6d4680 100755 --- a/scripts/debian/install.sh +++ b/scripts/debian/install.sh @@ -71,7 +71,7 @@ Signed-by: /etc/apt/keyrings/zus.gpg" | tee /etc/apt/sources.list.d/zbox.sources touch $CONFIG_PATH cat < ${CONFIG_PATH} --- -block_worker: https://dev.zus.network +block_worker: https://dev.zus.network # UPDATE: mainnet url signature_scheme: bls0chain min_submit: 50 min_confirmation: 50