Skip to content

Update release.yml

Update release.yml #19

Workflow file for this run

name: goreleaser
on:
pull_request:
push:
# run only against tags
tags:
- "*"
permissions:
contents: write
packages: write
issues: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
# 'latest', 'nightly', or a semver
version: "~> v2"
args: release --clean --verbose --config .goreleaser-github.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
- run: |
sudo apt-get install tree -y
tree dist
- name: Upload .deb artifact
uses: actions/upload-artifact@v3
with:
name: deb-package
path: dist/*amd64.deb
- name: Upload .deb artifact ARM
uses: actions/upload-artifact@v3
with:
name: deb-package-arm
path: dist/*arm64.deb
- name: Upload .rpm artifact
uses: actions/upload-artifact@v3
with:
name: rpm-package
path: dist/*x86_64.rpm
- name: Upload .apk artifact
uses: actions/upload-artifact@v3
with:
name: apk-package
path: dist/*.apk
packagecloud_amd64:
runs-on: ubuntu-latest
needs:
- goreleaser
strategy:
matrix:
distro:
- debian/bullseye
- debian/bookworm
- debian/trixie
- ubuntu/noble
- ubuntu/jammy
- ubuntu/mantic
- elementaryos/horus
- elementaryos/jolnir
- linuxmint/wilma
- linuxmint/virginia
- linuxmint/victoria
steps:
- name: Download .deb artifact
uses: actions/download-artifact@v3
with:
name: deb-package
- name: Push package to packagecloud.io
uses: computology/[email protected]
with:
package-name: ./*.deb
packagecloud-username: jelloeater
packagecloud-reponame: stampy
packagecloud-distro: ${{ matrix.distro }}
packagecloud-token: ${{ secrets.PACKAGECLOUD_TOKEN }}
packagecloud_amd64-rpm:
runs-on: ubuntu-latest
needs:
- goreleaser
strategy:
matrix:
distro:
- fedora/38
- fedora/39
- fedora/40
- amazon/2023
- amazon/2
- el/9
- el/8
- scientific/7
- scientific/6
steps:
- name: Download .rpm artifact
uses: actions/download-artifact@v3
with:
name: rpm-package
- name: Push package to packagecloud.io
uses: computology/[email protected]
with:
package-name: ./*.deb
packagecloud-username: jelloeater
packagecloud-reponame: stampy
packagecloud-distro: ${{ matrix.distro }}
packagecloud-token: ${{ secrets.PACKAGECLOUD_TOKEN }}
packagecloud_amd64-apk:
runs-on: ubuntu-latest
needs:
- goreleaser
strategy:
matrix:
distro:
- alpine/v3.20
- alpine/v3.19
- alpine/v3.18
steps:
- name: Download .apk artifact
uses: actions/download-artifact@v3
with:
name: apk-package
- name: Push package to packagecloud.io
uses: computology/[email protected]
with:
package-name: ./*.apk
packagecloud-username: jelloeater
packagecloud-reponame: stampy
packagecloud-distro: ${{ matrix.distro }}
packagecloud-token: ${{ secrets.PACKAGECLOUD_TOKEN }}
packagecloud_arm:
runs-on: ubuntu-latest
needs:
- goreleaser
strategy:
matrix:
distro:
- raspbian/forky
- raspbian/trixie
- raspbian/bookworm
steps:
- name: Download .deb artifact ARM
uses: actions/download-artifact@v3
with:
name: deb-package-arm
- name: Push package to packagecloud.io
uses: computology/[email protected]
with:
package-name: ./*.deb
packagecloud-username: jelloeater
packagecloud-reponame: stampy
packagecloud-distro: ${{ matrix.distro }}
packagecloud-token: ${{ secrets.PACKAGECLOUD_TOKEN }}