Skip to content

Commit f67af07

Browse files
committed
add release workflow
1 parent 46ba10d commit f67af07

File tree

3 files changed

+42
-2
lines changed

3 files changed

+42
-2
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
permissions:
11+
id-token: write # enable GitHub OIDC token issuance for this job
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
- name: Verify commit exists in origin/main
17+
run: |
18+
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
19+
git branch --remote --contains | grep origin/main
20+
- name: Set VERSION variable from tag
21+
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
22+
- name: Build
23+
run: dotnet build --configuration Release /p:Version=${VERSION}
24+
- name: Test
25+
run: dotnet test --configuration Release /p:Version=${VERSION} --no-build
26+
- name: Pack
27+
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
28+
- name: NuGet login
29+
uses: NuGet/login@v1
30+
id: login
31+
with:
32+
user: ${{ secrets.NUGET_USER }}
33+
34+
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)