Skip to content

Commit

Permalink
ci: fix chocolatey cli install
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelgautier committed Jan 18, 2025
1 parent cdc6623 commit 40cdf29
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
publish:
needs: test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
# if: startsWith(github.ref, 'refs/tags/')

permissions:
contents: write
Expand Down Expand Up @@ -104,21 +104,28 @@ jobs:

- name: install chocolatey
run: |
sudo apt-get --quiet update
sudo apt-get --no-install-suggests --no-install-recommends --quiet --yes install dirmngr ca-certificates gnupg
sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/debian stable-buster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt-get --quiet update
sudo apt-get --no-install-suggests --no-install-recommends --quiet --yes install mono-devel
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:
CHOCOLATEY_VERSION: 2.2.2

- uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
CHOCOLATEY_VERSION: 2.4.1
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}

# - uses: goreleaser/goreleaser-action@v6
# with:
# distribution: goreleaser
# version: latest
# args: release --clean
# env:
# GITHUB_TOKEN: ${{ secrets.PAT }}
# SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
# CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}

0 comments on commit 40cdf29

Please sign in to comment.