-
Notifications
You must be signed in to change notification settings - Fork 243
41 lines (41 loc) · 1.28 KB
/
choco-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
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"