-
Notifications
You must be signed in to change notification settings - Fork 63
65 lines (62 loc) · 1.7 KB
/
on_push.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
name: Release
on:
pull_request:
types: [opened, reopened, ready_for_review, synchronize]
push:
branches: [master]
tags-ignore: ["**"]
jobs:
version:
name: Version
concurrency: tagging
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
outputs:
semver_tag: ${{ steps.semver-tag.outputs.semver_tag }}
ancestor_tag: ${{ steps.semver-tag.outputs.ancestor_tag }}
is_prerelease: ${{ steps.semver-tag.outputs.is_prerelease }}
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Calculate semver tag
id: semver-tag
uses: gandarez/semver-action@master
with:
branching_model: trunk-based
prefix: v
debug: true
- name: Create tag
uses: actions/github-script@v7
with:
github-token: ${{ github.token }}
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/${{ steps.semver-tag.outputs.semver_tag }}",
sha: context.sha
})
build-dev14:
name: Build Dev14
runs-on: windows-2019
needs: [version]
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
-
name: Setup NuGet
uses: NuGet/setup-nuget@v1
-
name: Restore NuGet packages
run: nuget restore Dev14/Dev14.csproj
-
name: Build Dev14 for Release
run: msbuild Dev14/Dev14.csproj -property:Configuration=Release -property:platform="AnyCPU"