Skip to content

Commit 8c1d1c1

Browse files
author
Vladislav Kalugin
committed
add action
1 parent 92acdb7 commit 8c1d1c1

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/workflows/build.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build dotnet package
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- name: Setup .NET Core SDK 5.0.x
11+
uses: actions/setup-dotnet@v3
12+
with:
13+
dotnet-version: '5.0.x'
14+
- name: Build
15+
run: dotnet build --configuration Release
16+
- name: Upload dll
17+
uses: actions/upload-artifact@v3
18+
with:
19+
name: msbuild-database
20+
path: bin/Release/netstandard2.0/msbuild-database.dll
21+
22+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish release
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
8+
jobs:
9+
build-and-publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Setup .NET Core SDK 5.0.x
14+
uses: actions/setup-dotnet@v3
15+
with:
16+
dotnet-version: '5.0.x'
17+
- name: Build
18+
run: dotnet build --configuration Release
19+
- name: Set version
20+
run: |
21+
export VERSION=$(date '+%Y.%-m').$GITHUB_RUN_NUMBER
22+
echo "VERSION=$VERSION" >> $GITHUB_ENV
23+
- uses: "marvinpinto/action-automatic-releases@latest"
24+
with:
25+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
26+
automatic_release_tag: "${{ env.VERSION }}"
27+
prerelease: true
28+
files: bin/Release/netstandard2.0/msbuild-database.dll

0 commit comments

Comments
 (0)