From bbec4fbbbd449bc09ba873308722c356e52bbcf8 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sat, 5 Jun 2021 00:03:37 -0300 Subject: [PATCH] chore(ci): improve release process (#14) Signed-off-by: Carlos A Becker --- .github/workflows/build.yml | 6 ++++ goreleaser.yml | 56 ++++++------------------------------- 2 files changed, 15 insertions(+), 47 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 096a843..5678433 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,7 +41,13 @@ jobs: uses: goreleaser/goreleaser-action@v2 if: success() && startsWith(github.ref, 'refs/tags/') with: + distribution: goreleaser-pro version: latest args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GH_PAT }} + GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} + TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} + TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} + TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} + TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} diff --git a/goreleaser.yml b/goreleaser.yml index d044f1a..e5af2ef 100644 --- a/goreleaser.yml +++ b/goreleaser.yml @@ -1,49 +1,11 @@ project_name: tt -before: - hooks: - - go mod download - - ./scripts/completions.sh -builds: -- binary: tt - goos: - - linux - - windows - - darwin - goarch: - - amd64 - - arm64 -archives: -- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' - files: - - README.md - - LICENSE.md - - completions/* -brews: -- tap: - owner: caarlos0 - name: homebrew-tap +variables: homepage: https://github.com/caarlos0/tasktimer - description: Task Timer (tt) is a dead simple TUI task timer. - folder: Formula - install: |- - bin.install "tt" - bash_completion.install "completions/tt.bash" => "tt" - zsh_completion.install "completions/tt.zsh" => "_tt" - fish_completion.install "completions/tt.fish" -nfpms: -- maintainer: Carlos A Becker - description: Task Timer (tt) is a dead simple TUI task timer. - homepage: https://github.com/caarlos0/tasktimer - license: MIT - contents: - - src: ./completions/tt.bash - dst: /etc/bash_completion.d/tt - - src: ./completions/tt.fish - dst: /usr/share/fish/completions/tt.fish - - src: ./completions/tt.zsh - dst: /usr/local/share/zsh/site-functions/_tt - formats: - - deb - - rpm - - apk - + description: Task Timer (tt) is a dead simple TUI task timer +includes: + - from_url: + url: https://raw.githubusercontent.com/caarlos0/.goreleaserfiles/main/build.yml + - from_url: + url: https://raw.githubusercontent.com/caarlos0/.goreleaserfiles/main/package_with_completions.yml + - from_url: + url: https://raw.githubusercontent.com/caarlos0/.goreleaserfiles/main/release.yml