This repository was archived by the owner on Aug 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
57 lines (53 loc) · 2.1 KB
/
dotnet-core-release.yml
File metadata and controls
57 lines (53 loc) · 2.1 KB
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
name: .NET Core Release
on:
push:
branches: [ main ]
paths:
- 'src/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
- name: Bump version (without v-prefix)
uses: anothrNick/github-tag-action@1.33.0
id: v_less_dry_versioning_action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRY_RUN: true # allows fetching the version number without a v-prefix (which would break msbuild)
WITH_V: false
RELEASE_BRANCHES: main
INITIAL_VERSION: 1.0.0
- name: Publish CLI project
run: dotnet publish ./src/CLI/CLI.csproj --configuration Release --self-contained --runtime win-x64 /p:Version=${{ steps.v_less_dry_versioning_action.outputs.new_tag }} /p:AssemblyVersion=${{ steps.v_less_dry_versioning_action.outputs.new_tag }}
- name: Bump version (with v-prefix) and push tag
uses: anothrNick/github-tag-action@1.33.0
id: versioning_action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
RELEASE_BRANCHES: main
INITIAL_VERSION: 1.0.0
- name: Zip published CLI binaries
run: zip -r -j ${{ steps.versioning_action.outputs.tag }}.zip ./src/CLI/bin/Release/netcoreapp3.1/win-x64/publish
- name: Create GitHub release
uses: actions/create-release@v1.1.4
id: create_release_action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.versioning_action.outputs.tag }}
release_name: Release ${{ steps.versioning_action.outputs.tag }}
- name: Upload published binaries to GitHub release
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release_action.outputs.upload_url }}
asset_path: ./${{ steps.versioning_action.outputs.tag }}.zip
asset_name: ScaleUnitManagementTools_${{ steps.versioning_action.outputs.tag }}.zip
asset_content_type: application/zip