mirror of
https://github.com/bybrooklyn/openbitdo.git
synced 2026-03-19 04:12:56 -04:00
release: prepare v0.0.1-rc.4
This commit is contained in:
2
.github/ISSUE_TEMPLATE/release-blocker.yml
vendored
2
.github/ISSUE_TEMPLATE/release-blocker.yml
vendored
@@ -36,7 +36,7 @@ body:
|
||||
id: openbitdo_version
|
||||
attributes:
|
||||
label: OpenBitdo version
|
||||
placeholder: v0.0.1-rc.1
|
||||
placeholder: v0.0.1-rc.4
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
|
||||
4
.github/workflows/aur-publish.yml
vendored
4
.github/workflows/aur-publish.yml
vendored
@@ -4,13 +4,13 @@ on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Release tag to publish (for example: v0.0.1-rc.2)"
|
||||
description: "Release tag to publish (for example: v0.0.1-rc.4)"
|
||||
required: true
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Release tag to publish (for example: v0.0.1-rc.2)"
|
||||
description: "Release tag to publish (for example: v0.0.1-rc.4)"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
|
||||
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@@ -30,21 +30,21 @@ jobs:
|
||||
container: archlinux:base
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install AUR packaging toolchain
|
||||
- name: Install packaging validation toolchain
|
||||
run: |
|
||||
pacman -Sy --noconfirm --needed base-devel git
|
||||
- name: Ensure package metadata has pinned checksum fields
|
||||
pacman -Sy --noconfirm --needed base-devel git jq
|
||||
- name: Validate release metadata rendering
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if grep -nE 'SKIP|:no_check' \
|
||||
packaging/aur/openbitdo-bin/PKGBUILD \
|
||||
packaging/homebrew/Formula/openbitdo.rb; then
|
||||
echo "Found placeholder checksum markers; release metadata must be pinned." >&2
|
||||
exit 1
|
||||
fi
|
||||
test -f packaging/scripts/render_release_metadata.sh
|
||||
test -f packaging/aur/openbitdo-bin/PKGBUILD.tmpl
|
||||
test -f packaging/homebrew/Formula/openbitdo.rb.tmpl
|
||||
test ! -f packaging/homebrew/Formula/openbitdo.rb
|
||||
bash packaging/scripts/test_render_release_metadata.sh
|
||||
- name: Validate Homebrew tap sync helper
|
||||
run: |
|
||||
set -euo pipefail
|
||||
bash packaging/homebrew/test_sync_tap.sh
|
||||
- name: Validate PKGBUILD and .SRCINFO
|
||||
run: |
|
||||
useradd -m builder
|
||||
@@ -53,6 +53,10 @@ jobs:
|
||||
cd '$GITHUB_WORKSPACE/packaging/aur/openbitdo-bin'; \
|
||||
makepkg --printsrcinfo > /tmp/openbitdo-bin.srcinfo; \
|
||||
diff -u .SRCINFO /tmp/openbitdo-bin.srcinfo"
|
||||
- name: Check docs consistency
|
||||
run: |
|
||||
set -euo pipefail
|
||||
bash sdk/scripts/check_docs_consistency.sh
|
||||
|
||||
tui-smoke-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
82
.github/workflows/homebrew-publish.yml
vendored
Normal file
82
.github/workflows/homebrew-publish.yml
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
name: Homebrew Publish
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Release tag to publish (for example: v0.0.1-rc.4)"
|
||||
required: true
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Release tag to publish (for example: v0.0.1-rc.4)"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
publish-homebrew:
|
||||
if: vars.HOMEBREW_PUBLISH_ENABLED == '1'
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAG: ${{ inputs.tag }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Wait for release assets
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for attempt in $(seq 1 30); do
|
||||
if gh release view "$TAG" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
|
||||
echo "release ${TAG} is available"
|
||||
exit 0
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
echo "release ${TAG} was not found after waiting" >&2
|
||||
exit 1
|
||||
|
||||
- name: Render Homebrew formula from released assets
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p /tmp/release-input /tmp/release-metadata
|
||||
gh release download "$TAG" --repo "$GITHUB_REPOSITORY" \
|
||||
--pattern "openbitdo-${TAG}-linux-x86_64.tar.gz" \
|
||||
--pattern "openbitdo-${TAG}-linux-aarch64.tar.gz" \
|
||||
--pattern "openbitdo-${TAG}-macos-arm64.tar.gz" \
|
||||
--dir /tmp/release-input
|
||||
bash packaging/scripts/render_release_metadata.sh \
|
||||
"$TAG" \
|
||||
"$GITHUB_REPOSITORY" \
|
||||
/tmp/release-input \
|
||||
/tmp/release-metadata
|
||||
|
||||
- name: Upload rendered Homebrew formula (audit)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: homebrew-rendered-formula-${{ inputs.tag }}
|
||||
path: |
|
||||
/tmp/release-metadata/homebrew/Formula/openbitdo.rb
|
||||
/tmp/release-metadata/checksums.env
|
||||
|
||||
- name: Sync Homebrew tap
|
||||
env:
|
||||
HOMEBREW_PUBLISH_ENABLED: "1"
|
||||
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
|
||||
HOMEBREW_TAP_REPO: ${{ vars.HOMEBREW_TAP_REPO }}
|
||||
FORMULA_SOURCE: /tmp/release-metadata/homebrew/Formula/openbitdo.rb
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [[ -z "${HOMEBREW_TAP_TOKEN:-}" ]]; then
|
||||
echo "missing required secret: HOMEBREW_TAP_TOKEN" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ -z "${HOMEBREW_TAP_REPO:-}" ]]; then
|
||||
echo "missing required variable: HOMEBREW_TAP_REPO" >&2
|
||||
exit 1
|
||||
fi
|
||||
bash packaging/homebrew/sync_tap.sh
|
||||
58
.github/workflows/release.yml
vendored
58
.github/workflows/release.yml
vendored
@@ -269,61 +269,11 @@ jobs:
|
||||
|
||||
publish-homebrew:
|
||||
if: vars.HOMEBREW_PUBLISH_ENABLED == '1'
|
||||
runs-on: ubuntu-latest
|
||||
needs: publish
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Wait for release assets
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for attempt in $(seq 1 30); do
|
||||
if gh release view "${GITHUB_REF_NAME}" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
|
||||
exit 0
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
echo "release ${GITHUB_REF_NAME} was not found after waiting" >&2
|
||||
exit 1
|
||||
|
||||
- name: Render Homebrew formula with release checksums
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p /tmp/release-input /tmp/release-metadata
|
||||
gh release download "${GITHUB_REF_NAME}" --repo "$GITHUB_REPOSITORY" \
|
||||
--pattern "openbitdo-${GITHUB_REF_NAME}-linux-x86_64.tar.gz" \
|
||||
--pattern "openbitdo-${GITHUB_REF_NAME}-linux-aarch64.tar.gz" \
|
||||
--pattern "openbitdo-${GITHUB_REF_NAME}-macos-arm64.tar.gz" \
|
||||
--dir /tmp/release-input
|
||||
bash packaging/scripts/render_release_metadata.sh \
|
||||
"${GITHUB_REF_NAME}" \
|
||||
"$GITHUB_REPOSITORY" \
|
||||
/tmp/release-input \
|
||||
/tmp/release-metadata
|
||||
|
||||
- name: Upload rendered Homebrew formula (audit)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: homebrew-rendered-formula-${{ github.ref_name }}
|
||||
path: |
|
||||
/tmp/release-metadata/homebrew/Formula/openbitdo.rb
|
||||
/tmp/release-metadata/checksums.env
|
||||
|
||||
- name: Sync Homebrew tap
|
||||
env:
|
||||
HOMEBREW_PUBLISH_ENABLED: "1"
|
||||
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
|
||||
HOMEBREW_TAP_REPO: ${{ vars.HOMEBREW_TAP_REPO }}
|
||||
FORMULA_SOURCE: /tmp/release-metadata/homebrew/Formula/openbitdo.rb
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [[ -z "${HOMEBREW_TAP_TOKEN:-}" ]]; then
|
||||
echo "missing required secret: HOMEBREW_TAP_TOKEN" >&2
|
||||
exit 1
|
||||
fi
|
||||
bash packaging/homebrew/sync_tap.sh
|
||||
uses: ./.github/workflows/homebrew-publish.yml
|
||||
with:
|
||||
tag: ${{ github.ref_name }}
|
||||
secrets: inherit
|
||||
|
||||
publish-aur:
|
||||
if: vars.AUR_PUBLISH_ENABLED == '1'
|
||||
|
||||
Reference in New Issue
Block a user