Skip to content

Commit

Permalink
Merge pull request #76 from cerberauth/publish-choco
Browse files Browse the repository at this point in the history
ci: publish to chocolatey
  • Loading branch information
emmanuelgautier authored Apr 7, 2024
2 parents 06d8ae4 + 6558682 commit e9fd3ff
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 28 deletions.
39 changes: 13 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

publish-linux:
publish:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
Expand Down Expand Up @@ -77,36 +77,23 @@ jobs:
mkdir -p $HOME/.cache/snapcraft/download
mkdir -p $HOME/.cache/snapcraft/stage-packages
- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --skip chocolatey
- name: install chocolatey
run: |
mkdir -p /opt/chocolatey
wget -q -O - "https://github.com/chocolatey/choco/releases/download/${CHOCOLATEY_VERSION}/chocolatey.v${CHOCOLATEY_VERSION}.tar.gz" | tar -xz -C "/opt/chocolatey"
echo '#!/bin/bash' >> /usr/local/bin/choco
echo 'mono /opt/chocolatey/choco.exe $@' >> /usr/local/bin/choco
chmod +x /usr/local/bin/choco
choco upgrade chocolatey
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}

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

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 }}
CHOCOLATEY_VERSION: 2.2.2

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

chocolateys:
- name: vulnapi
owners: CerberAuth
- owners: CerberAuth
authors: Emmanuel Gautier
project_url: https://vulnapi.cerberauth.com/
icon_url: "https://avatars.githubusercontent.com/u/127022998"
Expand All @@ -62,6 +61,7 @@ chocolateys:
bug_tracker_url: https://github.com/cerberauth/vulnapi/issues
tags: "security vulnerability developer"
summary: VulnAPI is an open-source project designed to help you scan your APIs for common security vulnerabilities and weaknesses.
skip_publish: false
description: |
VulnAPI is an open-source project designed to help you scan your APIs for common security vulnerabilities and weaknesses.
Expand Down

0 comments on commit e9fd3ff

Please sign in to comment.