Skip to content

fix: use Hover JSON signin endpoints #3

fix: use Hover JSON signin endpoints

fix: use Hover JSON signin endpoints #3

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Configure Git for private GoCodeAlone repos
env:
RELEASES_TOKEN: ${{ secrets.RELEASES_TOKEN }}
run: |
if [ -z "$RELEASES_TOKEN" ]; then
echo "::error::RELEASES_TOKEN secret is not set. The goreleaser step needs it to resolve private GoCodeAlone module deps." >&2
exit 1
fi
git config --global url."https://x-access-token:${RELEASES_TOKEN}@github.com/GoCodeAlone/".insteadOf "https://github.com/GoCodeAlone/"
- uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Unset credentialed git config
if: always()
env:
RELEASES_TOKEN: ${{ secrets.RELEASES_TOKEN }}
run: |
git config --global --unset-all "url.https://x-access-token:${RELEASES_TOKEN}@github.com/GoCodeAlone/.insteadOf" || true
- name: Publish release (was draft during asset upload)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release edit ${{ github.ref_name }} --draft=false --repo ${{ github.repository }}
notify-workflow-registry:
name: Notify workflow-registry
runs-on: ubuntu-latest
permissions:
contents: read
needs: release
if: >-
!github.event.deleted
&& !contains(github.ref_name, '-')
&& github.repository == 'GoCodeAlone/workflow-plugin-hover'
steps:
- name: Trigger registry manifest sync
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4
with:
token: ${{ secrets.repo_dispatch_token }}
repository: GoCodeAlone/workflow-registry
event-type: plugin-release
client-payload: |-
{"plugin": "hover", "tag": "${{ github.ref_name }}"}