Skip to content

CHORE: Update deps and gogenerate (#2720) #9

CHORE: Update deps and gogenerate (#2720)

CHORE: Update deps and gogenerate (#2720) #9

Workflow file for this run

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-*
name: "Release: Make release candidate"
jobs:
draft_release:
name: draft release
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
pull-requests: write
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
# Why "fetch-depth: 0"? To generate the release notes, we need the
# full git history. A shallow checkout would make release notes going
# back one commit.
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ^1.21
# For some reason goreleaser isn't correctly setting the version
# string used by "dnscontrol version". Therefore, we're forcing the
# string using the GORELEASER_CURRENT_TAG feature.
# TODO(tlim): Use the native gorelease version mechanism.
- name: Retrieve version
id: version
run: |
echo "TAG_NAME=$(git config --global --add safe.directory /__w/dnscontrol/dnscontrol ; git describe --tags)" >> $GITHUB_OUTPUT
- name: Reveal version
run: echo ${{ steps.version.outputs.TAG_NAME }}
-
id: release
name: Goreleaser release
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ steps.version.outputs.TAG_NAME }}