-
Notifications
You must be signed in to change notification settings - Fork 11
68 lines (62 loc) · 1.81 KB
/
ci.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
name: ci
on:
workflow_dispatch:
inputs:
configuration:
type: choice
description: Build Configuration
required: true
default: Release
options:
- Release
- Debug
push-preview:
type: string
description: Push preview branch?
required: true
default: "false"
push:
branches-ignore:
- "preview/**"
paths-ignore:
- LICENSE
- README.md
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
jobs:
lint:
uses: f2calv/gha-workflows/.github/workflows/lint.yml@v1
versioning:
uses: f2calv/gha-workflows/.github/workflows/gha-release-versioning.yml@v1
with:
tag-prefix: ''
tag-and-release: false
build:
runs-on: ubuntu-latest
needs: [versioning]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: f2calv/gha-dotnet-nuget@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
configuration: ${{ inputs.configuration }}
push-preview: ${{ inputs.push-preview }}
version: ${{ needs.versioning.outputs.version }}
solution-name: CasCap.Api.GooglePhotos.Release.sln
env:
GOOGLE_PHOTOS_ACCESS_TOKEN: ${{ secrets.GOOGLE_PHOTOS_ACCESS_TOKEN }}
release:
needs: [versioning, build]
if: needs.versioning.outputs.release-exists == 'false'
&& (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || inputs.push-preview == 'true')
uses: f2calv/gha-workflows/.github/workflows/gha-release-versioning.yml@v1
permissions:
contents: write
with:
semVer: ${{ needs.versioning.outputs.version }}
tag-prefix: ''
move-major-tag: false