prepare v0.1.0 release
This commit is contained in:
24 files changed
+483
-127
No files matched your search
@@ -1,15 +1,50 @@
|
||||
name: build release archives
|
||||
name: release
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: Version to embed, such as v0.1.0 or v0.1.0-rc.1
|
||||
description: Version with release notes, such as v0.1.0
|
||||
required: true
|
||||
type: string
|
||||
permissions:
|
||||
contents: read
|
||||
concurrency:
|
||||
group: release-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
jobs:
|
||||
prepare:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
outputs:
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Validate release version and notes
|
||||
id: version
|
||||
env:
|
||||
VERSION_INPUT: ${{ inputs.version }}
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "$GITHUB_EVENT_NAME" == push ]]; then
|
||||
version="$GITHUB_REF_NAME"
|
||||
else
|
||||
version="$VERSION_INPUT"
|
||||
fi
|
||||
if [[ ! "$version" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z]+([.-][0-9A-Za-z]+)*)?$ ]]; then
|
||||
echo 'Expected vMAJOR.MINOR.PATCH[-PRERELEASE]' >&2
|
||||
exit 1
|
||||
fi
|
||||
test -s "docs/releases/$version.md"
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
verify:
|
||||
needs: prepare
|
||||
uses: ./.github/workflows/test.yml
|
||||
build:
|
||||
needs: [prepare, verify]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
@@ -21,13 +56,41 @@ jobs:
|
||||
go-version: "1.26.x"
|
||||
check-latest: true
|
||||
cache: true
|
||||
- name: Build archives
|
||||
- name: Build and verify archives
|
||||
env:
|
||||
RELEASE_VERSION: ${{ inputs.version }}
|
||||
run: bash scripts/release.sh "$RELEASE_VERSION"
|
||||
RELEASE_VERSION: ${{ needs.prepare.outputs.version }}
|
||||
run: |
|
||||
bash scripts/release.sh "$RELEASE_VERSION"
|
||||
bash scripts/verify-release.sh "$RELEASE_VERSION"
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: ask53-release-archives
|
||||
path: dist/
|
||||
name: ask53-release-${{ needs.prepare.outputs.version }}
|
||||
path: dist/${{ needs.prepare.outputs.version }}/
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
draft:
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||
needs: [prepare, build]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
contents: write
|
||||
actions: read
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Download verified archives and create draft
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
RELEASE_VERSION: ${{ needs.prepare.outputs.version }}
|
||||
shell: bash
|
||||
run: |
|
||||
gh run download "$GITHUB_RUN_ID" --name "ask53-release-$RELEASE_VERSION" --dir "dist/$RELEASE_VERSION"
|
||||
(cd "dist/$RELEASE_VERSION" && sha256sum -c SHA256SUMS)
|
||||
flags=(--draft --verify-tag --title "Ask53 $RELEASE_VERSION" --notes-file "docs/releases/$RELEASE_VERSION.md")
|
||||
if [[ "$RELEASE_VERSION" == *-* ]]; then
|
||||
flags+=(--prerelease)
|
||||
fi
|
||||
gh release create "$RELEASE_VERSION" "${flags[@]}" "dist/$RELEASE_VERSION/"*.tar.gz "dist/$RELEASE_VERSION/SHA256SUMS"
|
||||
@@ -1,8 +1,10 @@
|
||||
name: test
|
||||
on:
|
||||
push:
|
||||
branches: ['**']
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
permissions:
|
||||
contents: read
|
||||
concurrency:
|
||||
@@ -44,4 +46,6 @@ jobs:
|
||||
run: go test ./internal/dnsserver -run='^$' -fuzz=FuzzTXTWire -fuzztime=10s -parallel=2
|
||||
- name: Verify release packaging
|
||||
if: runner.os == 'Linux'
|
||||
run: make release VERSION=v0.0.0-ci
|
||||
run: |
|
||||
make release VERSION=v0.0.0-ci
|
||||
bash scripts/test-release.sh v0.0.0-ci
|
||||
Reference in new issue
Block a user