-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c54a61f
commit dbc5c4c
Showing
2 changed files
with
22 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,22 +29,29 @@ jobs: | |
fi | ||
echo "Building ${{ env.PROJECT}} .deb packages for tag ${{ env.RELEASE_TAG }}" | ||
- name: Checkout code | ||
- name: Checkout packages | ||
uses: actions/checkout@v3 | ||
|
||
- name: Checkout src code into tmp folder | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: SiaFoundation/${{ env.PROJECT }} | ||
ref: ${{ env.RELEASE_TAG }} | ||
path: "tmp" | ||
|
||
- name: Build .deb Package | ||
run: | | ||
TAG=${{ env.RELEASE_TAG }} | ||
VERSION=${TAG:1} | ||
# Move into the tmp directory | ||
cd tmp | ||
go generate ./... | ||
for arch in amd64 arm64; do | ||
# Helper vars | ||
TAG=${{ env.RELEASE_TAG }} | ||
VERSION=${TAG:1} | ||
BUILD_NAME=${{ env.PROJECT}}_$VERSION_$arch | ||
BUILD_NAME=${{ env.PROJECT }}_$VERSION_$arch | ||
# Make sure the right folder hierarchy exists for building the package | ||
# Create the directory structure for the .deb package | ||
mkdir -p $BUILD_NAME/DEBIAN | ||
mkdir -p $BUILD_NAME/usr/bin | ||
|
@@ -63,17 +70,21 @@ jobs: | |
echo "Building $BUILD_NAME.deb" | ||
dpkg-deb --build $BUILD_NAME | ||
# Move the .deb file to debian/pool/main/r/${{ env.PROJECT }} | ||
find . | ||
mv $BUILD_NAME.deb debian/pool/main/r/${{ env.PROJECT }}/ | ||
# Move the .deb file to debian/pool/main/${{ env.PROJECT }}/ | ||
find ../ | ||
mv $BUILD_NAME.deb debian/pool/main/${{ 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 | ||
dpkg-scanpackages debian/pool/main/${{ env.PROJECT }}/ /dev/null | gzip -9c > debian/dists/stable/main/binary-$arch/Packages.gz | ||
# Remove the temporary folders | ||
rm -rf $BUILD_NAME | ||
done | ||
# Move out of tmp and delete it | ||
cd ../ | ||
rm -rf src | ||
- name: Create Pull Request | ||
uses: peter-evans/[email protected] | ||
with: | ||
|
File renamed without changes.