-
Notifications
You must be signed in to change notification settings - Fork 104
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
Showing
1 changed file
with
93 additions
and
0 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,93 @@ | ||
--- | ||
name: Deploy to launchpad.net | ||
|
||
on: | ||
push: | ||
branches: 'ubuntu-*-*' | ||
|
||
jobs: | ||
build: | ||
name: Packaging software | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Import GPG key | ||
uses: crazy-max/ghaction-import-gpg@v4 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }} | ||
|
||
- name: Trust key | ||
run: | | ||
gpg --no-tty --command-fd 0 --edit-key ${{ secrets.GPG_KEY_ID }} <<EOTRUST | ||
trust | ||
5 | ||
y | ||
quit | ||
EOTRUST | ||
- name: List keys | ||
run: gpg -K | ||
|
||
- name: Run install commands | ||
run: sudo apt-get install dput devscripts debhelper | ||
|
||
- name: Packaging software | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
mkdir debian | ||
mkdir debian/source | ||
cp install.sh debian/postinst | ||
echo "3.0 (native)" >> debian/source/format | ||
echo "10" >> debian/compat | ||
cat <<EOT >> debian/control | ||
Source: automysqlbackup | ||
Maintainer: sixhop <[email protected]> | ||
Section: utils | ||
Priority: important | ||
Build-Depends: debhelper (>= 10) | ||
Standards-Version: 4.5.0 | ||
Package: automysqlbackup | ||
Architecture: any | ||
Homepage: https://github.com/sixhop/automysqlbackup | ||
Description: A fork and further development of AutoMySQLBackup from sourceforge. | ||
EOT | ||
- name: Creating changelog | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
echo -e '#!/usr/bin/make -f\n' >> debian/rules | ||
echo -e '%:\n' >> debian/rules | ||
echo -e '\tdh $@\n' >> debian/rules | ||
echo -e "automysqlbackup ($(echo $GITHUB_REF | grep -oP "([0-9].*)")) $(echo $GITHUB_REF | grep -oP "(?<=\-).*(?=\-)"); urgency=medium\n" >> debian/changelog | ||
echo -e " * ${{ github.event.head_commit.message }}\n" >> debian/changelog | ||
echo " -- ${{ secrets.GPG_OWNER }} $(date +'%a, %d %b %Y %T %z')" >> debian/changelog | ||
cat debian/changelog | ||
- name: Building AutoMySQLBackup | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
debuild -S -sa | ||
- name: Creating PPA configuration | ||
run: | | ||
echo "[ppa]" >> $HOME/.dput.cf | ||
echo "fqdn = ppa.launchpad.net" >> $HOME/.dput.cf | ||
echo "method = ftp" >> $HOME/.dput.cf | ||
echo "incoming = ${{ secrets.PPA_INCOMING }}" >> $HOME/.dput.cf | ||
echo "login = anonymous" >> $HOME/.dput.cf | ||
echo "allow_unsigned_uploads = 0" >> $HOME/.dput.cf | ||
- name: Publishing to PPA | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
dput ppa ../automysqlbackup_$(echo $GITHUB_REF | grep -oP "([0-9].*)" )_source.changes |