forked from maticnetwork/heimdall
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding new refactored packager, some clean up, shasums, etc
- Loading branch information
Showing
24 changed files
with
498 additions
and
655 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 |
---|---|---|
@@ -0,0 +1,153 @@ | ||
name: amoy_deb_profiles | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
paths: | ||
- '**' | ||
tags: | ||
- 'v*.*.*' | ||
- 'v*.*.*-*' | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
id-token: write | ||
contents: write | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
# Variables | ||
- name: Adding TAG to ENV | ||
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV | ||
- name: adding version | ||
run: | | ||
NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' ) | ||
echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV | ||
- name: Making directory structure for yaml | ||
run: mkdir -p packaging/deb/heimdalld/var/lib/heimdall | ||
- name: making directory structure for the systemd | ||
run: mkdir -p packaging/deb/heimdalld/lib/systemd/system | ||
- name: delete old control file | ||
run: rm -rf packaging/deb/heimdalld/DEBIAN/control | ||
|
||
# Control file creation | ||
- name: create control file | ||
run: | | ||
touch packaging/deb/heimdalld/DEBIAN/control | ||
echo "Package: heimdall-profile" >> packaging/deb/heimdalld/DEBIAN/control | ||
echo "Version: ${{ env.VERSION }}" >> packaging/deb/heimdalld/DEBIAN/control | ||
echo "Section: base" >> packaging/deb/heimdalld/DEBIAN/control | ||
echo "Priority: optional" >> packaging/deb/heimdalld/DEBIAN/control | ||
echo "Architecture: all" >> packaging/deb/heimdalld/DEBIAN/control | ||
echo "Maintainer: [email protected]" >> packaging/deb/heimdalld/DEBIAN/control | ||
echo "Description: heimdall profile package" >> packaging/deb/heimdalld/DEBIAN/control | ||
#### Sentry Profiles #### | ||
- name: Setting up heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} | ||
env: | ||
ARCH: all | ||
NODE: sentry | ||
NETWORK: amoy | ||
- name: Copying postinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/package_scripts/postinst.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst | ||
env: | ||
ARCH: all | ||
NODE: sentry | ||
NETWORK: amoy | ||
- name: Copying postrm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/package_scripts/postrm.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postrm | ||
env: | ||
ARCH: all | ||
NODE: sentry | ||
NETWORK: amoy | ||
- name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/systemd/heimdalld-amoy-sentry.service packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service | ||
env: | ||
ARCH: all | ||
NODE: sentry | ||
NETWORK: amoy | ||
- name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile | ||
run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} | ||
env: | ||
ARCH: all | ||
NODE: sentry | ||
NETWORK: amoy | ||
|
||
### Validator Profiles ### | ||
- name: Setting heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} | ||
env: | ||
ARCH: all | ||
NODE: validator | ||
NETWORK: amoy | ||
- name: Copying over the postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/package_scripts/postinst.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN//postinst | ||
env: | ||
ARCH: all | ||
NODE: validator | ||
NETWORK: amoy | ||
- name: Copying postrm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/package_scripts/postrm.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postrm | ||
env: | ||
ARCH: all | ||
NODE: validator | ||
NETWORK: amoy | ||
- name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/systemd/heimdalld-amoy-validator.service packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service | ||
env: | ||
ARCH: all | ||
NODE: validator | ||
NETWORK: amoy | ||
- name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile | ||
run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} | ||
env: | ||
ARCH: all | ||
NODE: validator | ||
NETWORK: amoy | ||
|
||
# Shasum | ||
- name: shasum the heimdall debian profile package | ||
run: cd packaging/deb/ && sha256sum heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum | ||
env: | ||
ARCH: all | ||
NODE: sentry | ||
NETWORK: amoy | ||
|
||
- name: shasum the heimdall debian profile package | ||
run: cd packaging/deb/ && sha256sum heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum | ||
env: | ||
ARCH: all | ||
NODE: validator | ||
NETWORK: amoy | ||
|
||
############ Check and Upload ########################## | ||
- name: Confirming package built | ||
run: ls -ltr packaging/deb/ | grep heimdall | ||
|
||
- name: Release heimdall Packages | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: ${{ env.GIT_TAG }} | ||
prerelease: true | ||
files: | | ||
packaging/deb/heimdall-amoy-**.deb | ||
packaging/deb/heimdall-amoy-**.deb.checksum | ||
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 |
---|---|---|
@@ -0,0 +1,178 @@ | ||
name: mainnet_deb_profiles | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
paths: | ||
- '**' | ||
tags: | ||
- 'v*.*.*' | ||
- 'v*.*.*-*' | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
id-token: write | ||
contents: write | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
# Variables | ||
- name: Adding TAG to ENV | ||
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV | ||
- name: adding version | ||
run: | | ||
NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' ) | ||
echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV | ||
- name: Making directory structure for yaml | ||
run: mkdir -p packaging/deb/heimdalld/var/lib/heimdall | ||
- name: making directory structure for the systemd | ||
run: mkdir -p packaging/deb/heimdalld/lib/systemd/system | ||
- name: delete old control file | ||
run: rm -rf packaging/deb/heimdalld/DEBIAN/control | ||
|
||
# Control file creation | ||
- name: create control file | ||
run: | | ||
touch packaging/deb/heimdalld/DEBIAN/control | ||
echo "Package: heimdall-profile" >> packaging/deb/heimdalld/DEBIAN/control | ||
echo "Version: ${{ env.VERSION }}" >> packaging/deb/heimdalld/DEBIAN/control | ||
echo "Section: base" >> packaging/deb/heimdalld/DEBIAN/control | ||
echo "Priority: optional" >> packaging/deb/heimdalld/DEBIAN/control | ||
echo "Architecture: all" >> packaging/deb/heimdalld/DEBIAN/control | ||
echo "Maintainer: [email protected]" >> packaging/deb/heimdalld/DEBIAN/control | ||
echo "Description: heimdall profile package" >> packaging/deb/heimdalld/DEBIAN/control | ||
#### Sentry Profiles #### | ||
- name: Setting up ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} | ||
env: | ||
ARCH: all | ||
NODE: sentry | ||
NETWORK: mainnet | ||
- name: Copying the preinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/package_scripts/preinst packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/preinst | ||
env: | ||
ARCH: all | ||
NODE: sentry | ||
NETWORK: mainnet | ||
- name: Copying the postinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst | ||
env: | ||
ARCH: all | ||
NODE: sentry | ||
NETWORK: mainnet | ||
- name: Copying the prerm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/package_scripts/prerm packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/prerm | ||
env: | ||
ARCH: all | ||
NODE: sentry | ||
NETWORK: mainnet | ||
- name: Copying the postrm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/package_scripts/postrm.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postrm | ||
env: | ||
ARCH: all | ||
NODE: sentry | ||
NETWORK: mainnet | ||
- name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/systemd/heimdalld-mainnet-sentry.service packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service | ||
env: | ||
ARCH: all | ||
NODE: sentry | ||
NETWORK: mainnet | ||
- name: Building ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile | ||
run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} | ||
env: | ||
ARCH: all | ||
NODE: sentry | ||
NETWORK: mainnet | ||
|
||
### Validator Profiles ### | ||
- name: Prepping heimdall ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} | ||
env: | ||
ARCH: all | ||
NODE: validator | ||
NETWORK: mainnet | ||
- name: Copying the preinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/package_scripts/preinst packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/preinst | ||
env: | ||
ARCH: all | ||
NODE: validator | ||
NETWORK: mainnet | ||
- name: Copying Postinstall script for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst | ||
env: | ||
ARCH: all | ||
NODE: validator | ||
NETWORK: mainnet | ||
- name: Copying the prerm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/package_scripts/prerm packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/prerm | ||
env: | ||
ARCH: all | ||
NODE: validator | ||
NETWORK: mainnet | ||
- name: Copying the postrm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/package_scripts/postrm.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postrm | ||
env: | ||
ARCH: all | ||
NODE: validator | ||
NETWORK: mainnet | ||
- name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} | ||
run: cp -rp packaging/templates/systemd/heimdalld-mainnet-validator.service packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service | ||
env: | ||
ARCH: all | ||
NODE: validator | ||
NETWORK: mainnet | ||
- name: Building heimdall ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile | ||
run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} | ||
env: | ||
ARCH: all | ||
NODE: validator | ||
NETWORK: mainnet | ||
|
||
# Shasum | ||
- name: shasum the heimdall debian profile package | ||
run: cd packaging/deb/ && sha256sum heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum | ||
env: | ||
ARCH: all | ||
NODE: validator | ||
NETWORK: mainnet | ||
|
||
- name: shasum the heimdall debian profile package | ||
run: cd packaging/deb/ && sha256sum heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum | ||
env: | ||
ARCH: all | ||
NODE: sentry | ||
NETWORK: mainnet | ||
|
||
|
||
############ Check and Upload ########################## | ||
- name: Confirming package built | ||
run: ls -ltr packaging/deb/ | grep heimdall | ||
|
||
- name: Release heimdall Packages | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: ${{ env.GIT_TAG }} | ||
prerelease: true | ||
files: | | ||
packaging/deb/heimdall-mainnet-**.deb | ||
packaging/deb/heimdall-mainnet-**.deb.checksum | ||
Oops, something went wrong.