-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (43 loc) · 1.39 KB
/
proto-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
42
43
44
45
46
47
48
name: Release ProtoBufEval
on:
workflow_dispatch:
inputs:
PKG_VERSION:
type: string
default: '1.0.0'
description: 'Nuget package version'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
- name: Prepare Tools
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser
version: latest
args: -f .goreleaser.yaml --snapshot --clean
workdir: src/protoeval-cli
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: GoRelease After Hook
run: ./src/hook.sh
shell: bash
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore src/ProtoBufEval.sln
- name: Build
run: dotnet build --no-restore src/ProtoBufEval.sln
- name: Test
run: dotnet test --no-build --verbosity normal src/ProtoBufEval.sln
- name: Pack Nuget Package
run: dotnet pack -v normal -c Release -p:PackageVersion=${{ inputs.PKG_VERSION }} -o nupkg src/ProtoBufEval/ProtoBufEval.csproj
- name: Publish NuGet packages
run : dotnet nuget push nupkg/*.nupkg --api-key ${{ secrets.NUGET_ACCESS_TOKEN }} --source https://api.nuget.org/v3/index.json