Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: enhance and relase 1.1.1 #18

chore: enhance and relase 1.1.1

chore: enhance and relase 1.1.1 #18

Workflow file for this run

name: goreleaser
on:
push:
tags:
- "*"
permissions:
contents: write
packages: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: 1.25
# - name: Extract version from tag
# id: get_version
# run: |
# # Get the tag name and remove 'v' prefix if present
# VERSION=${GITHUB_REF#refs/tags/}
# VERSION=${VERSION#v}
# echo "version=$VERSION" >> $GITHUB_OUTPUT
# echo "Detected version: $VERSION"
# - name: Update version files
# run: |
# VERSION="${{ steps.get_version.outputs.version }}"
# echo "Updating version to $VERSION"
# # Update version.go
# sed -i "s/const Version = \".*\"/const Version = \"$VERSION\"/" version.go
# # Update VERSION file
# echo "$VERSION" > VERSION
# # Show changes
# echo "=== version.go ==="
# grep "const Version" version.go
# echo "=== VERSION ==="
# cat VERSION
# - name: Commit version updates
# run: |
# git config --local user.email "github-actions[bot]@users.noreply.github.com"
# git config --local user.name "github-actions[bot]"
# VERSION="${{ steps.get_version.outputs.version }}"
# # Only add specific files we want to commit
# git add version.go VERSION
# # Check if there are changes to commit
# if git diff --cached --quiet; then
# echo "No version changes to commit"
# else
# git commit -m "chore: bump version to v$VERSION [skip ci]"
# git push origin HEAD:main
# fi
- name: setup required binaries
run: |
curl -sSfL https://get.anchore.io/syft | sudo sh -s -- -b /usr/local/bin
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}