Skip to content

Workflow file for this run

name: Attach files to release and upload to PPA
on:
workflow_dispatch:
release:
types:
- published
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check tag name
run: |
tag="${{ github.ref_name }}"
echo "$tag" | grep -Pq "^v\d+\.\d+\.\d+$" || (echo "Error: Tag name '$tag' does not correct." && exit 1)
- name: 📥 Clone repository
uses: actions/[email protected]
- name: ⚙️ Install dependencies
run: |
sudo apt install devscripts dput debhelper -y
- name: 🔐 Set up GPG key
run: |
echo "${{ secrets.PPA_GPG_KEY }}" | gpg --allow-secret-key-import --import --batch --yes
- name: 🛠️ Build
working-directory: ./dotload
run: |
export DEBEMAIL="[email protected]"
export DEBFULLNAME="Okinea Dev"
tag="${{ github.ref_name }}"
release_version=$(echo "$tag" | sed 's/v//g')
changes="You can view the changes at this link - https://github.com/okineadev/dotload/releases/tag/$tag"
key="-k2783259A7535F745"
# gpg_cmd="-p\"gpg --batch --passphrase ${{ secrets.PPA_GPG_KEY_PASSPHRASE }} --pinentry-mode loopback\""
dch --create --distribution jammy --package dotload --newversion $release_version $changes
debuild --no-lintian -i -p"gpg --batch --passphrase ${{ secrets.PPA_GPG_KEY_PASSPHRASE }} --pinentry-mode loopback" $key
debuild --no-lintian -S -sa -p"gpg --batch --passphrase ${{ secrets.PPA_GPG_KEY_PASSPHRASE }} --pinentry-mode loopback" $key
- name: 📦 Upload package to Ubuntu PPA
run: |
dput ppa:salumin/tools dotload_*_source.changes
- name: ⬆️ Upload files to release
uses: softprops/action-gh-release@v1
with:
files: |
dotload/bin/dotload
dotload_*.deb
dotload_*.dsc
dotload_*.tar.xz