mirror of
https://github.com/GMWalletApp/epusdt.git
synced 2026-07-07 18:26:16 +00:00
63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
permissions:
|
|
contents: write
|
|
id-token: write
|
|
attestations: write
|
|
|
|
concurrency:
|
|
group: release-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
goreleaser:
|
|
name: Build And Publish Binaries
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Ensure Tag Commit Is On Default Branch
|
|
env:
|
|
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
|
run: |
|
|
git fetch origin "$DEFAULT_BRANCH" --depth=1
|
|
if ! git merge-base --is-ancestor "$GITHUB_SHA" "origin/$DEFAULT_BRANCH"; then
|
|
echo "tag ${GITHUB_REF_NAME} must reference a commit reachable from ${DEFAULT_BRANCH}"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Set Up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version-file: src/go.mod
|
|
|
|
- name: Install Cosign
|
|
uses: sigstore/cosign-installer@v4.1.1
|
|
|
|
- name: Install Syft
|
|
uses: anchore/sbom-action/download-syft@v0.24.0
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v7
|
|
with:
|
|
distribution: goreleaser
|
|
version: "~> v2"
|
|
workdir: src
|
|
args: release --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Attest Release Checksums
|
|
uses: actions/attest@v4
|
|
with:
|
|
subject-checksums: src/dist/epusdt_${{ github.ref_name }}_checksums.txt
|