Skip to content

2.29.0-4.14.1

2.29.0-4.14.1 #10

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.20'
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
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@v3
with:
name: crc-chocolatey-nupkg-${{ github.event.release.tag_name }}
path: "./packaging/chocolatey/crc/*.nupkg"