Build & Upload to PPA #5
Workflow file for this run
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: Build & Upload to PPA | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install deps | |
| run: | | |
| sudo apt update | |
| sudo apt install -y devscripts debhelper dh-make meson ninja-build valac \ | |
| python3 python3-gi python3-gi-cairo gir1.2-gtk-4.0 gir1.2-adw-1 \ | |
| dput gnupg | |
| - name: Setup GPG | |
| run: | | |
| mkdir -p ~/.gnupg | |
| chmod 700 ~/.gnupg | |
| echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf | |
| echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf | |
| - name: Import GPG key | |
| run: | | |
| echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --yes --pinentry-mode loopback --import | |
| - name: Prepare source tarball | |
| run: | | |
| VERSION=${GITHUB_REF_NAME#v} | |
| cd .. | |
| cp -r gabutytb gabutytb-${VERSION} | |
| # nama harus sesuai dengan Package di debian/changelog | |
| tar -czf com.github.gabutakut.gabutytb_${VERSION}.orig.tar.gz gabutytb-${VERSION} | |
| - name: Build package | |
| env: | |
| DEBEMAIL: torik.habib@gmail.com | |
| DEBFULLNAME: torikulhabib | |
| GNUPGHOME: /home/runner/.gnupg | |
| run: | | |
| VERSION=${GITHUB_REF_NAME#v} | |
| cd ../gabutytb-${VERSION} | |
| chmod 644 debian/changelog debian/control debian/copyright | |
| dpkg-buildpackage -S -sa -d --no-sign | |
| echo "${{ secrets.GPG_PASSPHRASE }}" | \ | |
| gpg --batch --yes --pinentry-mode loopback \ | |
| --passphrase-fd 0 \ | |
| -u ${{ secrets.GPG_KEY_ID }} \ | |
| --clearsign ../*.dsc | |
| echo "${{ secrets.GPG_PASSPHRASE }}" | \ | |
| debsign -k${{ secrets.GPG_KEY_ID }} \ | |
| --no-re-sign \ | |
| -p"gpg --batch --yes --pinentry-mode loopback --passphrase ${{ secrets.GPG_PASSPHRASE }}" \ | |
| ../*.changes | |
| - name: Upload to PPA | |
| run: | | |
| cd .. | |
| dput ppa:torik-habib/gabutdm *.changes |