-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (64 loc) · 3.33 KB
/
create-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Create Release Adom.Framework
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*.*.*" # Push events to matching v*, i.e. v1.0, v20.15.10
# workflow_dispatch:
jobs:
build:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
draft: false
prerelease: false
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Publish Adom.Framework
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tags }}
run: |
dotnet build Adom.Framework/src/Adom.Framework/Adom.Framework.csproj --configuration Release
dotnet pack Adom.Framework/src/Adom.Framework/Adom.Framework.csproj --output nuget-packages --configuration Release -p:Version=$RELEASE_VERSION
dotnet nuget push nuget-packages/Adom.Framework*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
- name: Publish Adom.Framework.Validation
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: |
dotnet build Adom.Framework/src/Adom.Framework.Validation/Adom.Framework.Validation.csproj --configuration Release
dotnet pack Adom.Framework/src/Adom.Framework.Validation/Adom.Framework.Validation.csproj --output nuget-packages --configuration Release -p:Version=$RELEASE_VERSION
dotnet nuget push nuget-packages/Adom.Framework.Validation*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
- name: Publish Adom.Framework.AspNetCore
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: |
dotnet build Adom.Framework/src/Adom.Framework.AspNetCore/Adom.Framework.AspNetCore.csproj --configuration Release
dotnet pack Adom.Framework/src/Adom.Framework.AspNetCore/Adom.Framework.AspNetCore.csproj --output nuget-packages --configuration Release -p:Version=$RELEASE_VERSION
dotnet nuget push nuget-packages/Adom.Framework.AspNetCore*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
- name: Publish Adom.Framework.Security
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: |
dotnet build Adom.Framework/src/Adom.Framework.Security/Adom.Framework.Security.csproj --configuration Release
dotnet pack Adom.Framework/src/Adom.Framework.Security/Adom.Framework.Security.csproj --output nuget-packages --configuration Release -p:Version=$RELEASE_VERSION
dotnet nuget push nuget-packages/Adom.Framework.Security*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json