Skip to content

Commit

Permalink
Add separate goreleaser test workflow and add *bsd
Browse files Browse the repository at this point in the history
also ignore windows arm64 and arm7 builds

needs: charmbracelet/bubbletea#167
  • Loading branch information
aymanbagabas committed Dec 31, 2021
1 parent e8b5146 commit b479573
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 27 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/goreleaser-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: goreleaser-publish

on:
push:
tags:
- v*.*.*

concurrency:
group: goreleaser
cancel-in-progress: true

permissions:
contents: write
packages: write

jobs:
goreleaser:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: enabled
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist --skip-sign
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
26 changes: 2 additions & 24 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
name: goreleaser

on:
push:
tags:
- v*.*.*

concurrency: goreleaser

permissions:
contents: write
packages: write
on: [push, pull_request]

jobs:
goreleaser:
Expand All @@ -27,19 +18,6 @@ jobs:
with:
go-version: 1.17

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

Expand All @@ -52,7 +30,7 @@ jobs:
with:
distribution: goreleaser
version: latest
args: release --rm-dist --skip-sign
args: release --snapshot --rm-dist --skip-sign
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
9 changes: 9 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ builds:
- linux
- darwin
- windows
- freebsd
- openbsd
- netbsd
goarch:
- amd64
- arm64
Expand All @@ -26,6 +29,12 @@ builds:
- "7"
ignore:
- goos: windows
goarch: arm64
- goos: windows
goarm: "6"
- goos: windows
goarm: "7"
- goos: openbsd
goarm: "6"

archives:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.17

require (
github.com/charmbracelet/bubbles v0.9.0
github.com/charmbracelet/bubbletea v0.19.1
github.com/charmbracelet/bubbletea v0.19.2
github.com/charmbracelet/glamour v0.3.0
github.com/charmbracelet/lipgloss v0.4.0
github.com/charmbracelet/wish v0.1.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ github.com/charmbracelet/bubbles v0.9.0 h1:lqJ8FXwoLceQF2J0A+dWo1Cuu1dNyjbW4Opgd
github.com/charmbracelet/bubbles v0.9.0/go.mod h1:NWT/c+0rYEnYChz5qCyX4Lj6fDw9gGToh9EFJPajghU=
github.com/charmbracelet/bubbletea v0.14.1/go.mod h1:b5lOf5mLjMg1tRn1HVla54guZB+jvsyV0yYAQja95zE=
github.com/charmbracelet/bubbletea v0.19.0/go.mod h1:VuXF2pToRxDUHcBUcPmCRUHRvFATM4Ckb/ql1rBl3KA=
github.com/charmbracelet/bubbletea v0.19.1 h1:VHuzkJbnTAkxhOfi9+Lb5PYfNM9+Oh+qhP8uDX5ReOU=
github.com/charmbracelet/bubbletea v0.19.1/go.mod h1:VuXF2pToRxDUHcBUcPmCRUHRvFATM4Ckb/ql1rBl3KA=
github.com/charmbracelet/bubbletea v0.19.2 h1:tUSaPH1EFT8b6BbwAGm7a+uuTB3uI7hwaCOKQ7Yithk=
github.com/charmbracelet/bubbletea v0.19.2/go.mod h1:VuXF2pToRxDUHcBUcPmCRUHRvFATM4Ckb/ql1rBl3KA=
github.com/charmbracelet/glamour v0.3.0 h1:3H+ZrKlSg8s+WU6V7eF2eRVYt8lCueffbi7r2+ffGkc=
github.com/charmbracelet/glamour v0.3.0/go.mod h1:TzF0koPZhqq0YVBNL100cPHznAAjVj7fksX2RInwjGw=
github.com/charmbracelet/harmonica v0.1.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao=
Expand Down

0 comments on commit b479573

Please sign in to comment.