Make a workflow for signing our Debian packages #1
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: 'Sign Packages' | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
permissions: | ||
contents: read | ||
defaults: | ||
run: | ||
shell: bash | ||
jobs: | ||
Sign-Debian: | ||
name: Sign Debian packages | ||
runs-on: ubuntu-latest | ||
environment: sign | ||
steps: | ||
- id: sysprep | ||
name: Prep system for debsign work | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential devscripts gnupg | ||
continue-on-error: false | ||
- id: set-key | ||
name: Install signing key | ||
env: | ||
PRIVATE_KEY: ${{ secrets.KEY }} | ||
run: | | ||
gpg --import <<<"${PRIVATE_KEY}" | ||
echo "Keys:" | ||
gpg --list-secret-keys --keyid-format long | ||
continue-on-error: false | ||
- id: fetch | ||
name: Fetch Debian artifact from this workflow | ||
uses: actions/[email protected] | ||
with: | ||
name: package-deb | ||
path: deb | ||
continue-on-error: false | ||
- id: sign | ||
name: Run debsign | ||
env: | ||
DEBSIGN_KEYID: ${{ vars.DEBSIGN_KEYID }} | ||
working-directory: deb | ||
run: | | ||
Check failure on line 53 in .github/workflows/sign.yml GitHub Actions / Sign PackagesInvalid workflow file
|
||
echo "Signing with key ${{DEBSIGN_KEYID}}" | ||
debsign --debs-dir "${PWD}" | ||
continue-on-error: false | ||
- id: upload | ||
name: Upload Signed Result as artifact | ||
uses: actions/[email protected] | ||
working-directory: deb | ||
with: | ||
name: signed-deb | ||
if-no-files-found: error | ||
continue-on-error: false |