2.43.0-4.17.1 #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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.22' | |
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" |