Skip to content

Commit

Permalink
chore: use siyul-park/notify-pkg-go-dev@v1 when cd
Browse files Browse the repository at this point in the history
  • Loading branch information
siyul-park committed Dec 25, 2024
1 parent 7d1caf1 commit bbdba1d
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,5 @@ on:
jobs:
refresh:
runs-on: ubuntu-latest

steps:
- name: Refresh Go Modules
env:
BASE_URL: "https://pkg.go.dev/fetch"
REPO_URL: "github.com/${{ github.repository }}"
RELEASE_TAG: "${{ github.event.release.tag_name }}"
run: |
# If the tag contains '/', replace the last '/' with '@'
if [[ "$RELEASE_TAG" == *"/"* ]]; then
FORMATTED_TAG="/${RELEASE_TAG%/*}@${RELEASE_TAG##*/}"
else
FORMATTED_TAG="@${RELEASE_TAG}"
fi
FULL_URL="${BASE_URL}/${REPO_URL}${FORMATTED_TAG}"
echo "Sending POST request to $FULL_URL"
# Send the POST request
curl -X POST "$FULL_URL" --fail || echo "Failed to notify pkg.go.dev"
- uses: siyul-park/notify-pkg-go-dev@v1

0 comments on commit bbdba1d

Please sign in to comment.