Added badges #22
Workflow file for this run
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: | |
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: Release config | |
run: | | |
cat << EOF > .goreleaser-github.yaml | |
project_name: stampy | |
version: 2 | |
builds: | |
- env: [CGO_ENABLED=0] | |
goos: | |
- linux | |
- windows | |
- darwin | |
goarch: | |
- amd64 | |
- arm64 | |
nfpms: | |
- | |
maintainer: Jelloeater <jello@jelloeater.me> | |
bindir: /usr/local/bin | |
description: Copy formatted timestamp to system clipboard | |
homepage: https://github.com/Jelloeater/stampy | |
license: MIT | |
formats: | |
- deb | |
- rpm | |
- apk | |
- termux.deb | |
- archlinux | |
- ipk | |
release: | |
draft: false # If set to true, will not auto-publish the release. | |
replace_existing_draft: true | |
replace_existing_artifacts: true | |
target_commitish: "{{ .Commit }}" | |
prerelease: auto | |
make_latest: true | |
mode: replace | |
include_meta: true | |
signs: | |
- artifacts: checksum | |
cmd: gpg2 | |
args: | |
- "--batch" | |
- "-u" | |
- "{{ .Env.GPG_FINGERPRINT }}" | |
- "--output" | |
- "${signature}" | |
- "--detach-sign" | |
- "${artifact}" | |
EOF | |
- 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 }} | |
- name: List Dist | |
run: | | |
sudo apt-get install tree -y | |
tree dist | |
- name: Upload .deb artifact x86 | |
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 x86 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rpm-package | |
path: dist/*amd64.rpm | |
- name: Upload .apk artifact x86 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: apk-package | |
path: dist/*amd64.apk | |
pkgcld_amd64-deb: | |
runs-on: ubuntu-latest | |
needs: | |
- goreleaser | |
strategy: | |
max-parallel: 3 | |
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/packagecloud-github-action@v0.6 | |
with: | |
package-name: ./*.deb | |
packagecloud-username: jelloeater | |
packagecloud-reponame: stampy | |
packagecloud-distro: ${{ matrix.distro }} | |
packagecloud-token: ${{ secrets.PACKAGECLOUD_TOKEN }} | |
pkgcld_amd64-rpm: | |
runs-on: ubuntu-latest | |
needs: | |
- goreleaser | |
strategy: | |
max-parallel: 2 | |
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/packagecloud-github-action@v0.6 | |
with: | |
package-name: ./*.rpm | |
packagecloud-username: jelloeater | |
packagecloud-reponame: stampy | |
packagecloud-distro: ${{ matrix.distro }} | |
packagecloud-token: ${{ secrets.PACKAGECLOUD_TOKEN }} | |
pkgcld_arm-deb: | |
runs-on: ubuntu-latest | |
needs: | |
- goreleaser | |
strategy: | |
max-parallel: 1 | |
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/packagecloud-github-action@v0.6 | |
with: | |
package-name: ./*.deb | |
packagecloud-username: jelloeater | |
packagecloud-reponame: stampy | |
packagecloud-distro: ${{ matrix.distro }} | |
packagecloud-token: ${{ secrets.PACKAGECLOUD_TOKEN }} |