adds signing to packages

add ruby to so we can have packagecloud uploads

break up builds so we only publish amd64 artifacts to packagecloud, maybe fix packagecloud uploads

archives needs separate ids
This commit is contained in:
Cody Lee
2022-11-08 18:48:30 -06:00
parent c8555c3a22
commit ee707a3149
5 changed files with 225 additions and 16 deletions
+19 -1
View File
@@ -23,6 +23,8 @@ jobs:
with:
fetch-depth: 0
- run: git fetch --force --tags
- name: Install RPM tooling
run: sudo apt-get install -y rpm
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
@@ -34,12 +36,26 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.PACKAGECLOUD_SIGNING_GPG }}
- name: "Setup Ruby for packagecloud uploads"
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: "Install packagecloud gem"
run: gem install package_cloud
- uses: actions/setup-go@v3
with:
go-version: '>=1.19.3'
cache: true
# More assembly might be required: Docker logins, GPG, etc. It all depends
# on your needs.
- name: "make key file"
run: "echo '${{ secrets.PACKAGECLOUD_SIGNING_GPG }}' > /tmp/key.gpg"
- uses: goreleaser/goreleaser-action@v2
with:
# either 'goreleaser' (default) or 'goreleaser-pro':
@@ -53,4 +69,6 @@ jobs:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
DOCKER_REGISTRY: ${{ env.DOCKER_REGISTRY }}
DOCKER_IMAGE_NAME: ${{ env.DOCKER_IMAGE_NAME }}
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
PACKAGECLOUD_SIGNING_GPG: /tmp/key.gpg
PACKAGECLOUD_SIGNING_KEY_ID: ${{ steps.import_gpg.outputs.keyid }}