main
 1name: goreleaser
 2on:
 3  workflow_dispatch:
 4  push:
 5    tags:
 6      - "v*"
 7permissions:
 8  contents: write
 9jobs:
10  goreleaser:
11    runs-on: ubuntu-latest
12    steps:
13      - uses: actions/checkout@v2
14        with:
15          fetch-depth: 0
16      - uses: actions/setup-go@v2
17        with:
18          go-version: 1.18
19      - uses: goreleaser/goreleaser-action@v2
20        with:
21          version: latest
22          args: release --rm-dist
23        env:
24          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25      - uses: actions/upload-artifact@v2
26        with:
27          name: http-server
28          path: dist/*
29        env:
30          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}