-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (53 loc) · 1.66 KB
/
adoscope-nuget-build.yaml
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: adoscope-nuget-build
on:
push:
branches:
- main
paths-ignore:
- '.github/**'
- 'README.md'
pull_request:
branches:
- main
paths-ignore:
- '.github/**'
- 'README.md'
workflow_dispatch:
jobs:
versionupdate:
name: Update Version - Revision
runs-on: ubuntu-latest
steps:
- uses: action-pack/set-secret@v1
with:
name: 'REVISION'
value: $((${{ secrets.REVISION }}+1))
token: ${{ secrets.REPO_ACCESS_TOKEN }}
versionprepare:
name: Version Prepare
runs-on: windows-latest
needs: [versionupdate]
outputs:
buildVersion: ${{ steps.set_version.outputs.buildVersion }}
steps:
- uses: actions/checkout@v3
- name: Setting up build version
id: set_version
run: |
$major = ${{ vars.MAJOR }}
$minor = ${{ vars.MINOR }}
$revision = ${{ secrets.REVISION }}
$commitHash = "${{ github.sha }}".Substring(0,7) # Short SHA
$buildVersion = "${major}.${minor}.${revision}-$commitHash-alpha"
echo "::set-output name=buildVersion::$buildVersion"
echo "BuildVersion=$buildVersion" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo "BuildVersion=$buildVersion" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
buildpackage:
name: Build
needs: [versionprepare]
uses: gentoorax/Promethix.Framework.Ado/.github/workflows/adoscope-reusable-build.yaml@main
with:
buildVersion: ${{ needs.versionprepare.outputs.buildVersion }}
dotnetVersion: '8.0.x'
secrets:
repoToken: ${{ secrets.REPO_ACCESS_TOKEN }}