Skip to content

Commit bc89736

Browse files
committed
Merged build and deployment
1 parent ab42f5b commit bc89736

File tree

2 files changed

+35
-43
lines changed

2 files changed

+35
-43
lines changed

.github/workflows/dotnet.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,38 @@ jobs:
2727
- name: "Build & test"
2828
run: |
2929
echo "done!"
30-
pwd
30+
pwd
31+
32+
deploy:
33+
runs-on: ubuntu-latest
34+
needs: build
35+
if: github.ref == 'refs/heads/master'
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Setup .NET
39+
uses: actions/setup-dotnet@v1
40+
with:
41+
dotnet-version: 6.0.x
42+
- name: Restore dependencies
43+
run: dotnet restore
44+
- name: Build
45+
run: dotnet build --configuration Release --no-restore
46+
- name: Publish
47+
run: dotnet publish --configuration Release --no-restore
48+
- name: NugetPush
49+
run: |
50+
ls ./GithubActionsHelloWorld/bin/Release
51+
dotnet nuget push ./GithubActionsHelloWorld/bin/Release/*.*nupkg --skip-duplicate --include-symbols -p:SymbolPackageFormat=snupkg --api-key ${{secrets.NUGET_TOKEN}} --source https://int.nugettest.org/
52+
- uses: papeloto/action-zip@v1
53+
with:
54+
files: ./GithubActionsHelloWorld/bin/Release/net6.0/publish/
55+
dest: GithubActionsHelloWorld.zip
56+
- uses: "marvinpinto/action-automatic-releases@latest"
57+
with:
58+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
59+
automatic_release_tag: "latest"
60+
prerelease: true
61+
title: "Development Build"
62+
files: |
63+
LICENSE
64+
GithubActionsHelloWorld.zip

.github/workflows/publish.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)