diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7fccb0534e..aed48889a1 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -8,7 +8,6 @@ jobs: build: runs-on: ubuntu-latest - container: ghcr.io/rsteube/carapace steps: - name: shallow clone uses: actions/checkout@v3 @@ -49,17 +48,27 @@ jobs: - name: "carapace-lint" run: go run ./cmd/carapace-lint completers/*/cmd/*.go + - name: setup-snapcraft + if: startsWith(github.ref, 'refs/tags/') + # FIXME: the mkdirs are a hack for https://github.com/goreleaser/goreleaser/issues/1715 + run: | + sudo apt-get update + sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft + mkdir -p $HOME/.cache/snapcraft/download + mkdir -p $HOME/.cache/snapcraft/stage-packages + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v4 if: startsWith(github.ref, 'refs/tags/') with: version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} AUR_KEY: ${{ secrets.AUR_KEY }} FURY_TOKEN: ${{ secrets.FURY_TOKEN }} GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} + SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} doc: runs-on: ubuntu-latest diff --git a/.goreleaser.yml b/.goreleaser.yml index e970d3fcad..cb454544cb 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -29,26 +29,30 @@ changelog: exclude: - '^docs:' - '^test:' + brews: - name: carapace description: "multi-shell multi-command argument completer" homepage: "https://github.com/rsteube/carapace-bin" license: "MIT" - tap: + repository: owner: rsteube name: homebrew-tap token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}" commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" -scoop: - description: "multi-shell multi-command argument completer" - homepage: "https://github.com/rsteube/carapace-bin" - license: "MIT" - bucket: - owner: rsteube - name: scoop-bucket - token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}" - commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}" + +scoops: + - + description: "multi-shell multi-command argument completer" + homepage: "https://github.com/rsteube/carapace-bin" + license: "MIT" + repository: + owner: rsteube + name: scoop-bucket + token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}" + commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}" + aurs: - description: "multi-shell multi-command argument completer" @@ -75,6 +79,12 @@ nfpms: - rpm - termux.deb +snapcrafts: + - + summary: "multi-shell multi-command argument completer" + description: "multi-shell multi-command argument completer" + license: "MIT" + publishers: - name: fury cmd: "bash -c \"[[ {{.ArtifactPath}} =~ ^.*.(deb|rpm)$ ]] && curl -F package=@{{abs .ArtifactPath}} https://$FURY_TOKEN@push.fury.io/rsteube/ || true\""