generated from wayfair-incubator/oss-template
-
Notifications
You must be signed in to change notification settings - Fork 11
39 lines (35 loc) · 1.2 KB
/
publish_preview.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
name: Publish Preview to NuGet
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+-preview-[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-alpha-[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-beta-[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-prerelease-[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc-[0-9]+"
jobs:
preview:
runs-on: ubuntu-latest
environment:
name: "Publish Preview"
steps:
- uses: actions/checkout@v3
name: Check Out Code
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
- name: Restore Dependencies
run: dotnet restore src
- name: Build
run: dotnet build src --configuration Release --no-restore
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Pack NuGet
run: dotnet pack src/AeroSharp/AeroSharp.csproj --no-build --configuration Release /p:Version=${VERSION} --output src
- name: Publish NuGet
run: dotnet nuget push src/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_KEY} --skip-duplicate
env:
NUGET_KEY: ${{ secrets.NUGET_API_KEY }}