Skip to content

Commit 3efcefb

Browse files
committed
add github pipeline
1 parent 144dc73 commit 3efcefb

File tree

4 files changed

+60
-2
lines changed

4 files changed

+60
-2
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: External Worker Build and Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
timeout-minutes: 15
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
- name: Build
15+
run: dotnet build --configuration Release
16+
- name: Test
17+
run: dotnet test --configuration Release --no-build

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
on:
2+
push:
3+
tags:
4+
- "v[0-9]+.[0-9]+.[0-9]+"
5+
permissions:
6+
id-token: write
7+
8+
jobs:
9+
build-and-publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- name: Verify commit exists in origin/main
18+
run: |
19+
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
20+
git branch --remote --contains | grep origin/main
21+
- name: Set VERSION variable from tag
22+
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
23+
- name: Build
24+
run: dotnet build --configuration Release /p:Version=${VERSION}
25+
- name: Test
26+
run: dotnet test --configuration Release /p:Version=${VERSION} --no-build
27+
- name: Pack
28+
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
29+
- name: NuGet login
30+
uses: NuGet/login@v1
31+
id: login
32+
with:
33+
user: ${{ secrets.NUGET_USER }}
34+
- name: Publish the package
35+
run: dotnet nuget push Flowable.Client.ExternalWorker.${VERSION}.nupkg --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ obj/
44
riderModule.iml
55
/_ReSharper.Caches/
66
.idea
7-
*.DotSettings.user
7+
*.DotSettings.user
8+
*.nupkg

FlowableExternalWorkerClient/FlowableExternalWorkerClient.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
<TargetFramework>net7.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7-
</PropertyGroup>
87

8+
<PackageId>Flowable.ExternalWorkerClient</PackageId>
9+
<Company>Flowable</Company>
10+
<RepositoryType>git</RepositoryType>
11+
<RepositoryUrl>https://github.com/flowable/flowable-external-client.net</RepositoryUrl>
12+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
13+
</PropertyGroup>
914
</Project>

0 commit comments

Comments
 (0)