Skip to content

2.37.1-4.15.14

2.37.1-4.15.14 #18

Workflow file for this run

---
name: Publish CRC choco to community feed
on:
release:
types: [published]
jobs:
build:
if: github.event.release.prerelease != true
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-2022
go:
- '1.21'
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Build the chocolatey package
shell: powershell
run: make choco
- name: Add api key for choco community feed
env:
CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }}
run: choco apikey --key "$env:CHOCO_API_KEY" --source https://push.chocolatey.org/
- name: Push the choco to community.chocolatey.org
shell: bash
run: |
CRC_VERSION=${{ github.event.release.tag_name }}
CRC_VERSION=${CRC_VERSION:1}
choco push ./packaging/chocolatey/crc/crc.$CRC_VERSION.nupkg --source https://push.chocolatey.org/
- name: Upload nupkg artifact
uses: actions/upload-artifact@v4
with:
name: crc-chocolatey-nupkg-${{ github.event.release.tag_name }}
path: "./packaging/chocolatey/crc/*.nupkg"