1name: goreleaser
2
3on:
4 push:
5 tags:
6 - '*'
7
8permissions:
9 contents: write
10
11jobs:
12 goreleaser:
13 runs-on: ubuntu-latest
14 steps:
15 - name: Checkout
16 uses: actions/checkout@v2
17 with:
18 fetch-depth: 0
19
20 - name: Clone internal repositories
21 run: |
22 git clone -b release https://${{ secrets.ACCESS_TOKEN }}@github.com/charmbracelet/charm-internal ../charm
23 git clone -b master https://${{ secrets.ACCESS_TOKEN }}@github.com/charmbracelet/bubbletea-internal ../bubbletea
24 git clone -b main https://${{ secrets.ACCESS_TOKEN }}@github.com/charmbracelet/wish ../wish
25
26 - name: Set up Go
27 uses: actions/setup-go@v2
28 with:
29 go-version: 1.17
30
31 - name: Login to DockerHub
32 uses: docker/login-action@v1
33 with:
34 registry: docker.io/charmcli
35 username: ${{ secrets.DOCKERHUB_USERNAME }}
36 password: ${{ secrets.DOCKERHUB_TOKEN }}
37
38 - name: Login to GitHub Container Registry
39 uses: docker/login-action@v1
40 with:
41 registry: ghcr.io
42 username: ${{ github.repository_owner }}
43 password: ${{ secrets.GITHUB_TOKEN }}
44
45 - name: Set up Docker Buildx
46 id: buildx
47 uses: docker/setup-buildx-action@v1
48
49 - name: Run GoReleaser
50 uses: goreleaser/goreleaser-action@v2
51 with:
52 distribution: goreleaser
53 version: latest
54 args: release --rm-dist
55 env:
56 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57
58 - name: Update Docker Hub Readme
59 uses: christian-korneck/update-container-description-action@v1
60 with:
61 destination_container_repo: charmcli/soft-serve
62 provider: dockerhub
63 short_description: "A tasty Git server 🍦"
64 readme_file: "README.md"