Skip to content

Commit

Permalink
fix(goreleaser): fix invalid syntax (#1060)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykzts authored Dec 20, 2023
1 parent e15408c commit f78bff3
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 37 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check

on:
pull_request:
branches: [main]
push:
branches: [main]
tags: ['!*']

env:
GORELEASER_VERSION: 1.21.1

jobs:
goreleaser-check:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- name: GoReleaser Check
uses: goreleaser/goreleaser-action@v5
with:
args: check
version: ${{ env.GORELEASER_VERSION }}
5 changes: 0 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,13 @@ jobs:
go-version: ${{ matrix.go-version }}

- name: Get dependencies
env:
GO111MODULE: on
run: |
sudo apt-get update
sudo apt-get install -y libaom-dev libwebp-dev
go mod download
- name: Test
env:
GO111MODULE: on
MANAEL_ENABLE_AVIF: true
run: |
mkdir -p cover
Expand All @@ -45,6 +42,4 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Build
env:
GO111MODULE: on
run: make
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
tags: ['v*']

env:
GORELEASER_VERSION: 1.21.1
LIBAOM_VERSION: 3.8.0
LIBWEBP_VERSION: 1.3.2

Expand Down Expand Up @@ -65,8 +66,8 @@ jobs:
- name: Release
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release
args: release --clean
version: ${{ env.GORELEASER_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CGO_CFLAGS: -I/tmp/libwebp/include -I/tmp/libaom/include
Expand Down
44 changes: 14 additions & 30 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
env:
- GO111MODULE=on
before:
hooks:
- go mod download
builds:
- main: ./cmd/manael/main.go
binary: manael
Expand All @@ -14,35 +9,24 @@ builds:
- linux
goarch:
- amd64
archives:
- replacements:
linux: Linux
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: '{{ .Tag }}-next'
changelog:
sort: asc
filters:
exclude:
- '^v\d+(?:\.\d+){0,2}$'
skip: true
dockers:
- build_flag_templates:
- '--pull'
- '--label=org.opencontainers.image.authors=Manael Authors'
- '--label=org.opencontainers.image.created={{.Date}}'
- '--label=org.opencontainers.image.description=Manael is a simple HTTP proxy for processing images.'
- '--label=org.opencontainers.image.licenses=MIT'
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
- '--label=org.opencontainers.image.source={{.GitURL}}'
- '--label=org.opencontainers.image.title={{.ProjectName}}'
- '--label=org.opencontainers.image.url=https://manael.org/'
- '--label=org.opencontainers.image.version={{.Version}}'
- --pull
- --label=org.opencontainers.image.authors=Manael Authors
- --label=org.opencontainers.image.created={{.Date}}
- --label=org.opencontainers.image.description=Manael is a simple HTTP proxy for processing images.
- --label=org.opencontainers.image.licenses=MIT
- --label=org.opencontainers.image.revision={{.FullCommit}}
- --label=org.opencontainers.image.source={{.GitURL}}
- --label=org.opencontainers.image.title={{.ProjectName}}
- --label=org.opencontainers.image.url=https://manael.org/
- --label=org.opencontainers.image.version={{.Version}}
image_templates:
- 'ghcr.io/manaelproxy/{{ .ProjectName }}:latest'
- 'ghcr.io/manaelproxy/{{ .ProjectName }}:{{ .Major }}.{{ .Minor }}.{{ .Patch }}'
- 'ghcr.io/manaelproxy/{{ .ProjectName }}:{{ .Major }}.{{ .Minor }}'
- ghcr.io/manaelproxy/{{ .ProjectName }}:latest
- ghcr.io/manaelproxy/{{ .ProjectName }}:{{ .Major }}.{{ .Minor }}.{{ .Patch }}
- ghcr.io/manaelproxy/{{ .ProjectName }}:{{ .Major }}.{{ .Minor }}
dockerfile: Dockerfile
ids:
- manael

0 comments on commit f78bff3

Please sign in to comment.