mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-02-09 13:36:56 +02:00
docs: GitHub Actions code example (#4516)
I've changed the GitHub Action workflow code example to be more inline with the code example on the GitHub repository: 1. https://goreleaser.com/ci/actions/#workflow 2. https://github.com/goreleaser/goreleaser-action?tab=readme-ov-file#workflow This is done by four commits for better code/git diff: 1.7f6d9eefff
Changed the GitHub action workflow from `actions/checkout@v3` to `actions/checkout@v4`. Copying from the code example on the GitHub repository `goreleaser/goreleaser-action`: 1.effc880f3d
The `name` items 2.9d7fc2949e
The comments 3.3118f60fb0
The workflow trigger `on`: `pull_request`
This commit is contained in:
parent
fdd5d89dcf
commit
75c23abdca
@ -17,6 +17,7 @@ Below is a simple snippet to use this action in your workflow:
|
||||
name: goreleaser
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
# run only against tags
|
||||
tags:
|
||||
@ -31,25 +32,26 @@ jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- run: git fetch --force --tags
|
||||
- uses: actions/setup-go@v4
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: stable
|
||||
# More assembly might be required: Docker logins, GPG, etc.
|
||||
# It all depends on your needs.
|
||||
- uses: goreleaser/goreleaser-action@v5
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v5
|
||||
with:
|
||||
# either 'goreleaser' (default) or 'goreleaser-pro':
|
||||
# either 'goreleaser' (default) or 'goreleaser-pro'
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --clean
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
|
||||
# distribution:
|
||||
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
|
||||
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user