Skip to content

Merge pull request #51 from ellisvalentiner/dependabot/github_actions… #182

Merge pull request #51 from ellisvalentiner/dependabot/github_actions…

Merge pull request #51 from ellisvalentiner/dependabot/github_actions… #182

Workflow file for this run

name: goreleaser
on:
push:
tags:
- v*
branches:
- main
pull_request:
permissions:
contents: write
packages: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Fetch all tags
run: git fetch --force --tags
-
name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
-
name: Log in to registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Check GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
args: check
-
name: Build
uses: goreleaser/goreleaser-action@v5
with:
args: build --rm-dist --snapshot
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
if: startsWith(github.ref, 'refs/tags/v')
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}