-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 1.36 KB
/
dotnet-pack-auth-functions.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
name: Auth-Functions - Pack and Publish
on:
workflow_dispatch:
inputs:
packageVersion:
description: 'The resultant version for this package'
required: true
jobs:
pack-and-publish:
runs-on: ubuntu-latest
env:
DOTNET_CORE_VERSION: 6.0.x
BUILD_PATH: ./src/Airslip.Common.Auth.Functions/Airslip.Common.Auth.Functions.csproj
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET Core SDK
uses: actions/[email protected]
with:
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
- name: Add nuget feed
run: dotnet nuget add source --username ${{ secrets.PACKAGE_USER }} --password ${{ secrets.PACKAGE_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/airslip-ltd/index.json"
- name: Install dependencies
run: dotnet restore ${{ env.BUILD_PATH }}
- name: Build
run: dotnet build ${{ env.BUILD_PATH }} --configuration Release
- name: Pack
run: dotnet pack ${{ env.BUILD_PATH }} --configuration Release --no-restore --no-build -p:Version=${{ github.event.inputs.packageVersion }} --output nupkgs
- name: Push
run: dotnet nuget push nupkgs/*.nupkg --source https://nuget.pkg.github.com/airslip-ltd/index.json --api-key ${GITHUB_TOKEN}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}