diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a8ab3751..aedcbf5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,9 +6,9 @@ on: workflow_dispatch: inputs: tag: - description: 'Tag to build' + description: 'Version to build' required: true - default: 'v1.0.2' + default: 'v1.0.0' project: description: 'Project to build' required: true @@ -39,8 +39,10 @@ jobs: run: | go generate ./... for arch in amd64 arm64; do - # Declare the build id which is project_tag_arch - BUILD_NAME=${{ format('{0}_{1}', env.PROJECT, env.RELEASE_TAG) }}_$arch + # Helper vars + TAG=${{ env.RELEASE_TAG }} + VERSION=${TAG:1} + BUILD_NAME=${{ env.PROJECT}}_$VERSION_$arch # Make sure the right folder hierarchy exists for building the package mkdir -p $BUILD_NAME/DEBIAN @@ -51,7 +53,7 @@ jobs: # Create the control file echo "Package: ${{ env.PROJECT }}" > $BUILD_NAME/DEBIAN/control - echo "Version: ${{ env.RELEASE_TAG }}" >> $BUILD_NAME/DEBIAN/control + echo "Version: $VERSION" >> $BUILD_NAME/DEBIAN/control echo "Architecture: $arch" >> $BUILD_NAME/DEBIAN/control echo "Maintainer: The Sia Foundation " >> $BUILD_NAME/DEBIAN/control echo "Description: Renterd: The Next-Gen Sia Renter" >> $BUILD_NAME/DEBIAN/control @@ -60,14 +62,14 @@ jobs: # Build the .deb file dpkg-deb --build $BUILD_NAME - # Remove the temporary folders - rm -rf $BUILD_NAME - # Move the .deb file to debian/pool/main/r/${{ env.PROJECT }} mv $BUILD_NAME.deb debian/pool/main/r/${{ env.PROJECT }}/ # Update the Packages file dpkg-scanpackages debian/pool/main/r/${{ env.PROJECT }}/ /dev/null | gzip -9c > debian/dists/stable/main/binary-$arch/Packages.gz + + # Remove the temporary folders + rm -rf $BUILD_NAME done - name: Create Pull Request diff --git a/README.md b/README.md index 2c17cd22..4dda6031 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,3 @@ echo "deb [trusted=yes] https://siafoundation.github.io/linux/debian stable main - Enable GitHub pages to get link working - Add gpg key to get rid of `trusted=yes` -- Automate building packages -- Add missing architectures -- Testing