Skip to content

Commit a37091b

Browse files
committed
add github builds
1 parent 2025b1c commit a37091b

File tree

3 files changed

+106
-0
lines changed

3 files changed

+106
-0
lines changed

.github/workflows/dotnet.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: .NET
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Fetch history
17+
run: git fetch --prune --unshallow
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v1
20+
with:
21+
dotnet-version: 8.0.x
22+
- name: Restore dependencies
23+
run: |
24+
dotnet restore src/S7CommPlusDriver
25+
dotnet restore src/DriverTest
26+
dotnet restore src/S7CommPlusGUIBrowser
27+
28+
- name: Build
29+
run: |
30+
dotnet build src/S7CommPlusDriver
31+
dotnet build src/DriverTest
32+
dotnet build src/S7CommPlusGUIBrowser

.github/workflows/dotnetpull.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: .NET Pull Request
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Setup .NET
15+
uses: actions/setup-dotnet@v1
16+
with:
17+
dotnet-version: 8.0.x
18+
- name: Restore dependencies
19+
run: |
20+
dotnet restore src/S7CommPlusDriver
21+
dotnet restore src/DriverTest
22+
dotnet restore src/S7CommPlusGUIBrowser
23+
- name: Build
24+
run: |
25+
dotnet build src/S7CommPlusDriver
26+
dotnet build src/DriverTest
27+
dotnet build src/S7CommPlusGUIBrowser

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: .NET
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Fetch history
15+
run: git fetch --prune --unshallow
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v1
18+
with:
19+
dotnet-version: 8.0.x
20+
- name: Restore dependencies
21+
run: |
22+
dotnet restore src/S7CommPlusDriver
23+
dotnet restore src/DriverTest
24+
dotnet restore src/S7CommPlusGUIBrowser
25+
26+
- name: Update project version
27+
uses: roryprimrose/set-vs-sdk-project-version@v1
28+
with:
29+
version: ${{ github.event.release.tag_name }}
30+
assemblyVersion: ${{ github.event.release.tag_name }}
31+
fileVersion: ${{ github.event.release.tag_name }}
32+
informationalVersion: ${{ github.event.release.tag_name }}-${{ github.sha }}
33+
34+
- name: Build
35+
run: |
36+
dotnet build src/S7CommPlusDriver
37+
dotnet build src/DriverTest
38+
dotnet build src/S7CommPlusGUIBrowser
39+
40+
- name: Publish NuGet
41+
# You may pin to the exact commit or the version.
42+
# uses: brandedoutcast/publish-nuget@c12b8546b67672ee38ac87bea491ac94a587f7cc
43+
uses: brandedoutcast/[email protected]
44+
with:
45+
# Filepath of the project to be packaged, relative to root of repository
46+
PROJECT_FILE_PATH: MonacoRoslynCompletionProvider/MonacoRoslynCompletionProvider/MonacoRoslynCompletionProvider.csproj
47+
NUGET_KEY: ${{secrets.NUGET_API_KEY}}

0 commit comments

Comments
 (0)