Skip to content

feat(bootstrap): support target repository hook in universal installer #17

feat(bootstrap): support target repository hook in universal installer

feat(bootstrap): support target repository hook in universal installer #17

Workflow file for this run

name: Release
on:
push:
branches:
- master
tags:
- '*'
permissions:
contents: write
jobs:
check-run:
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.check.outputs.should_run }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
run.yes
sparse-checkout-cone-mode: false
- name: Check if run.yes exists
id: check
run: |
if [ -f "run.yes" ]; then
echo "should_run=true" >> $GITHUB_OUTPUT
echo "✅ run.yes is present. Proceeding with release."
else
echo "should_run=false" >> $GITHUB_OUTPUT
echo "🚫 run.yes is not present. Skipping release."
fi
goreleaser:
needs: check-run
if: needs.check-run.outputs.should_run == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
cache: true
- name: Go Build Cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/Library/Caches/go-build
~/AppData/Local/go-build
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}-
${{ runner.os }}-go-build-
- name: Update rolling tag
if: github.ref == 'refs/heads/master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}
# Delete the existing release and tag on GitHub to prevent GoReleaser asset collisions
gh release delete v0.0.0 --cleanup-tag -y || true
git tag -f v0.0.0 ${{ github.sha }}
git push -f origin v0.0.0
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}