diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f446b4..c7c090e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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/') @@ -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 }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 9784a07..58016e3 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -50,8 +50,7 @@ brews: email: emmanuel@cerberauth.com chocolateys: - - name: vulnapi - owners: CerberAuth + - owners: CerberAuth authors: Emmanuel Gautier project_url: https://vulnapi.cerberauth.com/ icon_url: "https://avatars.githubusercontent.com/u/127022998" @@ -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.