Skip to content

Commit d3b6d69

Browse files
adding release workflow
1 parent b5b8d90 commit d3b6d69

2 files changed

Lines changed: 26 additions & 4 deletions

File tree

.github/workflows/ci-build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ name: Build and Tests
22

33
on:
44
push:
5-
branches: [ main ]
65
pull_request:
76
branches: [ main ]
87

98
jobs:
109
build:
11-
10+
defaults:
11+
run:
12+
working-directory: ./src
1213
runs-on: ubuntu-latest
1314
env:
1415
VSTEST_CONNECTION_TIMEOUT: 900
@@ -18,10 +19,11 @@ jobs:
1819
- name: Setup .NET Core
1920
uses: actions/setup-dotnet@v1
2021
with:
21-
dotnet-version: '6.0.x'
22+
dotnet-version: |
23+
6.0.x
2224
- name: Install dependencies
2325
run: dotnet restore
2426
- name: Build
25-
run: dotnet build --configuration Release --no-restore
27+
run: dotnet build --configuration Release --no-restore
2628
- name: Test
2729
run: dotnet test --no-restore --verbosity normal

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
9+
release:
10+
runs-on: ubuntu-latest
11+
env:
12+
VERSION: 1.2.3
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Install dependencies
16+
run: dotnet restore
17+
- name: Build
18+
run: dotnet build ./src/GeoJSON.Text.sln --configuration Release --no-restore /p:Version=$VERSION
19+
- name: Pack
20+
run: dotnet pack -c Release -p:PackageVersion=$VERSION

0 commit comments

Comments
 (0)