Create deb packages #39
This file contains hidden or 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
| name: Create deb packages | |
| on: [workflow_dispatch,workflow_call] | |
| permissions: write-all | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| distro: [jammy, noble] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Import GPG Key | |
| uses: crazy-max/ghaction-import-gpg@v1 | |
| env: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| - name: Install clang-21 | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 21 clang | |
| # Set up the SSH agent with the private key from secrets | |
| - name: Setup SSH agent | |
| uses: webfactory/ssh-agent@v0.9.1 | |
| with: | |
| ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| # Add the host's key to known_hosts to prevent 'Host key verification failed' errors | |
| # Replace 'your-host.com' with the actual hostname or IP | |
| - name: Add remote host key | |
| run: ssh-keyscan ppa.launchpad.net >> ~/.ssh/known_hosts | |
| shell: bash | |
| - name: Install paramiko | |
| run: pip install paramiko | |
| - name: Install dput.cf | |
| run: | | |
| cp .dput.cf ~/.dput.cf | |
| cat ~/.dput.cf | |
| - name: Install system libraries | |
| run: | | |
| sudo apt update | |
| sudo apt install -y equivs build-essential devscripts debhelper dh-make dput debhelper-compat \ | |
| cmake ninja-build libjemalloc-dev libgsl-dev libblas-dev libgslcblas0 | |
| - name: Create deb packages | |
| run: | | |
| REPO_DIR=$PWD | |
| TAG=v2026.03.2 | |
| TAG=$(echo $TAG | sed s'/-/./') | |
| DATE=$(date -R) | |
| VERSION=${TAG:1}.${{ matrix.distro }} | |
| echo $VERSION | |
| cd packages/deb | |
| git clone --recursive https://github.com/ton-blockchain/ton.git debian/source | |
| rm -rf debian/source/example | |
| rm -rf debian/source/third-party/rocksdb/docs | |
| rm -rf debian/source/.git/modules/third-party/rocksdb/objects/pack/* | |
| sed -i "s/REVISION/${VERSION}/g" debian/changelog | |
| sed -i "s/VERSION/${VERSION}/g" debian/changelog | |
| sed -i "s/DATE/${DATE}/g" debian/changelog | |
| sed -i "s/DISTRO/${{ matrix.distro }}/g" debian/changelog | |
| dpkg-buildpackage -S -kDA58A5F65D5236A0C8FD9A54AF03339AD20F1920 -sa -rfakeroot -tc | |
| dput ton ../ton_${VERSION}_source.changes |