Files
unpoller-unpoller-4/.github/workflows/release.yml
dependabot[bot] 92d29a4d95 Bump docker/login-action from 1.10.0 to 2.2.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 1.10.0 to 2.2.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1.10.0...v2.2.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-08 19:51:29 +00:00

80 lines
2.6 KiB
YAML

name: Release
on:
push:
# run only against tags
tags:
- '*'
permissions:
contents: write
packages: write
# issues: write
jobs:
release:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
DOCKER_REGISTRY: "ghcr.io"
DOCKER_IMAGE_NAME: "unpoller/unpoller"
steps:
- uses: actions/checkout@v4
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@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v2.2.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }}
- 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@v4
with:
go-version: '>=1.20.5'
cache: true
# More assembly might be required: Docker logins, GPG, etc. It all depends
# on your needs.
- name: "make key file"
run: "echo '${{ secrets.GPG_SIGNING_KEY }}' > /tmp/key.gpg"
- uses: goreleaser/goreleaser-action@v4
with:
# either 'goreleaser' (default) or 'goreleaser-pro':
distribution: goreleaser-pro
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
# distribution:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
# This needs to be reset every year (next one at 2023-12-22) - use a fine grained PAT with Contents: R/W on golift/homebrew-mugs.
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
GPG_SIGNING_KEY: /tmp/key.gpg
GPG_SIGNING_KEY_ID: ${{ steps.import_gpg.outputs.keyid }}