Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Commit 2c4a41d

Browse files
committed
feat(cd): adds a release workflow for tags
- Created a new workflow that will try to publish nugets when a tag is pushed - Tags could be created anywhere, so... we need a policy to inhibit people from pushing tags from other branches.
1 parent 4d5f71b commit 2c4a41d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Setup .NET Core
15+
uses: actions/setup-dotnet@v1
16+
with:
17+
dotnet-version: 2.2.108
18+
- name: Build the solution
19+
run: dotnet build --configuration Release /p:Version=${GITHUB_REF:11}
20+
- name: Pack the solution
21+
run: |
22+
dotnet pack --configuration Release --output "./artifacts" /p:Version=${GITHUB_REF:11} /p:PackageVersion=${GITHUB_REF:11}
23+
- name: Publish all nugets
24+
run: |
25+
for i in `find src -name *.nupkg | grep 'bin/Release/'`; do dotnet nuget push $i -k ${{ secrets.NugetApiKey }} -s https://api.nuget.org/v3/index.json; done

0 commit comments

Comments
 (0)