Files
coredns/.github/workflows/release.yml
dependabot[bot] 6511a8cd53 build(deps): bump actions/checkout from 6.0.3 to 7.0.0 (#8194)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.3 to 7.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](df4cb1c069...9c091bb21b)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-24 22:08:39 -07:00

71 lines
2.2 KiB
YAML

name: Release
on:
workflow_dispatch:
inputs:
commit:
description: "Commit (e.g., 52f0348)"
default: "master"
permissions:
contents: read
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.inputs.commit }}
persist-credentials: false
- name: Set up info
env:
INPUT_COMMIT: ${{ github.event.inputs.commit }}
run: |
set -x -e
VERSION=$(make -f Makefile.release version)
COMMIT=$(git rev-parse --quiet --verify "${INPUT_COMMIT}")
if [[ "$(git tag -l v${VERSION})" == "v${VERSION}" ]]; then
echo "v${VERSION} already released"
exit 1
fi
echo "commit=${COMMIT}" >> $GITHUB_OUTPUT
echo "version=${VERSION}" >> $GITHUB_OUTPUT
id: info
- name: Build release binary
run: make -f Makefile.release release
- name: Build release binary sha256
run: (cd release; for asset in `ls -A *.tgz *.zip`; do sha256sum $asset > $asset.sha256; done)
- name: Remove hidden section
env:
VERSION: ${{ steps.info.outputs.version }}
run: sed '/+++/,//d' "notes/coredns-${VERSION}.md" > release.md
- name: Log release info
env:
COMMIT: ${{ steps.info.outputs.commit }}
VERSION: ${{ steps.info.outputs.version }}
run: |
set -x -e
git log -1
echo "${COMMIT}"
echo "${VERSION}"
cat release.md
sha256sum release/*.tgz release/*.zip
- name: Draft release
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
with:
body_path: release.md
name: v${{ steps.info.outputs.version }}
tag_name: v${{ steps.info.outputs.version }}
target_commitish: ${{ steps.info.outputs.commit }}
files: |
release/*.tgz
release/*.tgz.sha256
release/*.zip
release/*.zip.sha256
draft: true