Skip to content

Commit

Permalink
ci: setup choco command
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelgautier committed Mar 28, 2024
1 parent ffc740c commit 39453ba
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 9 deletions.
36 changes: 32 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- main

env:
GO_VERSION: '1.22'
GO_VERSION: "1.22"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -40,15 +40,14 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

publish:
publish-linux:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')

permissions:
contents: write
packages: write
pull-requests: write

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -86,8 +85,37 @@ jobs:
with:
distribution: goreleaser
version: latest
args: release --clean
args: release --skip chocolatey
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}

publish-windows:
needs: build
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/')

permissions:
contents: write
packages: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- run: git fetch --force --tags

- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --skip publish,snapcraft,docker,homebrew
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
4 changes: 1 addition & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ brews:
email: [email protected]

chocolateys:
- name: "{{ .ProjectName }}"
- name: vulnapi
owners: CerberAuth
authors: Emmanuel Gautier
project_url: https://vulnapi.cerberauth.com/
Expand All @@ -64,8 +64,6 @@ chocolateys:
summary: VulnAPI is an open-source project designed to help you scan your APIs for common security vulnerabilities and weaknesses.
description: |
VulnAPI is an open-source project designed to help you scan your APIs for common security vulnerabilities and weaknesses.
dependencies:
- id: nfpm
nfpms:
- package_name: "{{ .ProjectName }}"
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/std-uritemplate/std-uritemplate/go v0.0.54 h1:8t7J7tNuMDj4Vkqq+IRENQDZTZzXJZZbN+iD60PEiAs=
github.com/std-uritemplate/std-uritemplate/go v0.0.54/go.mod h1:CLZ1543WRCuUQQjK0BvPM4QrG2toY8xNZUm8Vbt7vTc=
github.com/std-uritemplate/std-uritemplate/go v0.0.55 h1:muSH037g97K7U2f94G9LUuE8tZlJsoSSrPsO9V281WY=
github.com/std-uritemplate/std-uritemplate/go v0.0.55/go.mod h1:rG/bqh/ThY4xE5de7Rap3vaDkYUT76B0GPJ0loYeTTc=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
Expand Down

0 comments on commit 39453ba

Please sign in to comment.