added workflow for deb test #3
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
name: Release | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
actions: write | |
jobs: | |
apt_release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: main | |
path: './' | |
- name: Get latest tag | |
run: | | |
latest_tag=$(git describe --tags --abbrev=0 | sed 's/^v//') | |
echo "Latest Tag: $latest_tag" | |
echo "latest_tag=$latest_tag" >> $GITHUB_ENV | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Set up Go | |
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- name: Install requirements | |
run: sudo apt-get install dh-make debhelper devscripts fakeroot | |
- name: Generate ChangeLog | |
run: | | |
DEBFULLNAME="Sacha Roussakis-Notter" DEBEMAIL="vaultify@buungroup.com" dch --create -v ${{ env.latest_tag }} --package vaultify --distribution stable "Automated changelog entry." | |
- name: Build Debian Packages | |
run: | | |
dpkg-buildpackage -us -uc | |
- name: Sign binary | |
run: | | |
gpg --armor --detach-sign --output vaultify_${{ env.latest_tag }}_amd64.deb.sig vaultify_${{ env.latest_tag }}_amd64.deb | |
gpg --armor --detach-sign --output vaultify_${{ env.latest_tag }}.tar.gz.sig vaultify_${{ env.latest_tag }}.tar.gz | |
env: | |
GPG_TTY: /dev/tty | |
- name: List Files | |
run: | | |
ls -al |