-
Notifications
You must be signed in to change notification settings - Fork 22
34 lines (28 loc) · 986 Bytes
/
build.yaml
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
name: Build
on: [push, pull_request ]
jobs:
build:
runs-on: ubuntu-20.04
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
steps:
- name: Install .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Fetch sources
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run tests
run: |
pushd test/Tmds.ExecFunction.Tests && dotnet test && popd
- name: Build packages
run: |
VERSION_SUFFIX="${{ github.run_number }}-${{ github.sha }}"
dotnet pack src/Tmds.ExecFunction --configuration Release --output src/Tmds.ExecFunction /p:VersionSuffix="$VERSION_SUFFIX"
- name: Publish packages
run: |
dotnet nuget push -s https://www.myget.org/F/tmds/api/v2/package -k "${{ secrets.NUGET_APIKEY }}" src/Tmds.ExecFunction/*.nupkg
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}