Skip to content

Merge pull request #13 from harakeishi/fix-release-action #27

Merge pull request #13 from harakeishi/fix-release-action

Merge pull request #13 from harakeishi/fix-release-action #27

Workflow file for this run

name: goreleaser
on:
push:
branches:
- main
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
-
name: Create tag
id: create-tag
run: |
echo 'deb [trusted=yes] https://apt.fury.io/caarlos0/ /' | sudo tee /etc/apt/sources.list.d/caarlos0.list
sudo apt update
sudo apt install svu
echo "::set-output name=Version::$(svu p)"
git tag "$(svu p)"
git push --tags
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
Version: ${{ steps.create-tag.outputs.Version }}