Skip to content

feat(ci): trigger profile README update on release via repository_dis… #4

feat(ci): trigger profile README update on release via repository_dis…

feat(ci): trigger profile README update on release via repository_dis… #4

Workflow file for this run

# Runs GoReleaser on version tag pushes (v*.*.*) to publish

Check failure on line 1 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

(Line: 36, Col: 13): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.PROFILE_DISPATCH_TOKEN != ''
# cross-platform binaries for linux, macOS, and Windows.
# After a successful release, fires a repository_dispatch event to the
# profile repo so the README is updated immediately with the new version.
name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger profile README update
if: ${{ secrets.PROFILE_DISPATCH_TOKEN != '' }}
env:
PROFILE_DISPATCH_TOKEN: ${{ secrets.PROFILE_DISPATCH_TOKEN }}
run: |
PROFILE_REPO="${{ github.repository_owner }}/${{ github.repository_owner }}"
curl -s -o /dev/null -w "%{http_code}" -X POST \
-H "Authorization: Bearer $PROFILE_DISPATCH_TOKEN" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/${PROFILE_REPO}/dispatches" \
-d "{\"event_type\":\"livemark-release\",\"client_payload\":{\"version\":\"${{ github.ref_name }}\"}}"