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:
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