Skip to content

Snapshot

Snapshot #705

Workflow file for this run

name: Snapshot
on:
schedule:
- cron: '15 5 * * *'
workflow_dispatch:
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version-file: go.mod
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
continue-on-error: true
timeout-minutes: 2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }}
- name: goreleaser release
uses: goreleaser/goreleaser-action@v4
with:
args: release --rm-dist --skip-sign --snapshot --timeout 2h
- name: artifact naming
id: naming
run: |
case $GITHUB_REF in
refs/heads/*)
ARTIFACT="${GITHUB_REF#refs/heads/}";;
refs/pull/*)
ARTIFACT="pr-${GITHUB_REF#refs/pull/}"
ARTIFACT="${ARTIFACT%/merge}";;
*)
ARTIFACT="${GITHUB_REF}";;
esac
echo "artifact=$ARTIFACT-$(date -u +'%Y-%m-%dT%H-%M')" >> "$GITHUB_OUTPUT"
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: ${{steps.naming.outputs.artifact}}
path: dist/*.zip