-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (30 loc) · 1.21 KB
/
main.yml
File metadata and controls
30 lines (30 loc) · 1.21 KB
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
name: Build and Test
on:
push:
branches:
- main
jobs:
runner:
if: github.event_name == 'push' && contains(toJson(github.event.commits), '***NO_CI***') == false && contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false
name: Package Pipeline
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup .NET
uses: actions/setup-dotnet@v1
- name: Build Solution
run: dotnet build -c Release
- name: Test Solution
run: dotnet test
- name: GH Deploy Workaround
run: |
export REPO_NAME=$(echo ${GITHUB_REPOSITORY} | sed 's/stoiveyp\///')
for f in ./${REPO_NAME}/bin/Release/Tumblr.NetStandard*.nupkg
do
curl -vX PUT -u "stoiveyp:${{ secrets.GITHUB_TOKEN }}" -F package=@$f https://nuget.pkg.github.com/stoiveyp/
done
shell: bash
- name: Deploy to NuGet
run: |
export REPO_NAME=$(echo ${GITHUB_REPOSITORY} | sed 's/stoiveyp\///')
dotnet nuget push ./${REPO_NAME}/bin/Release/Tumblr.NetStandard*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json