Skip to content

Commit 38a8ee6

Browse files
committed
update workflows
1 parent 97e8f19 commit 38a8ee6

File tree

2 files changed

+17
-41
lines changed

2 files changed

+17
-41
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Build and Test
2-
2+
permissions:
3+
contents: read
34
on:
45
workflow_dispatch:
56
push:
@@ -13,4 +14,5 @@ jobs:
1314
with:
1415
channelProviderName: Transmitly.Microsoft.Aspnet.Mvc
1516
secrets: inherit
17+
1618

.github/workflows/release.yml

Lines changed: 14 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,18 @@
1-
#execute fails if we use a try to use a reusable workflow
2-
# - Checkout is 'shallow' despite fetch-depth: 0
3-
# - Command failed: C:\hostedtoolcache\windows\GitVersion.Tool\6.0.2\dotnet-gitversion.exe with no error message
4-
name: Release
5-
on:
1+
name: Build and Test
2+
permissions:
3+
contents: read
4+
on:
5+
workflow_dispatch:
66
push:
77
tags:
88
- "v[0-9]+.[0-9]+.[0-9]+"
9-
env:
10-
channelProviderName: Transmitly.Microsoft.Aspnet.Mvc
11-
buildConfiguration: Release
9+
10+
paths:
11+
- "src/Transmitly.Microsoft.Aspnet.Mvc/**"
1212
jobs:
13-
windows-build:
14-
runs-on: windows-latest
15-
steps:
16-
- uses: actions/checkout@v4
17-
with:
18-
fetch-depth: 0
19-
- name: Verify commit exists in origin/main
20-
run: |
21-
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
22-
git branch --remote --contains | grep origin/main
23-
- name: Install GitVersion
24-
uses: gittools/actions/gitversion/setup@v3.0.0
25-
with:
26-
versionSpec: '5.x'
27-
- name: Determine Version
28-
uses: gittools/actions/gitversion/execute@v3.0.0
29-
with:
30-
disableShallowCloneCheck: true
31-
- name: Setup MSBuild
32-
uses: microsoft/setup-msbuild@v1
33-
- name: dotnet
34-
uses: actions/setup-dotnet@v3
35-
- name: Build netcore solution
36-
run: dotnet build ${{env.channelProviderName}}.sln --configuration ${{env.buildConfiguration}} -p:AssemblyVersion=${{ env.majorMinorPatch }} -p:FileVersion=${{ env.majorMinorPatch }} -p:InformationalVersion=${{ env.informationalVersion }}
37-
- name: Package
38-
run: dotnet pack --no-build --include-source /p:Version=${{ env.majorMinorPatch }} --configuration ${{env.buildConfiguration}} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
39-
- name: Publish Nuget
40-
run: dotnet nuget push src\${{env.channelProviderName}}\bin\${{env.buildConfiguration}}\${{env.channelProviderName}}*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
41-
- name: Add github source
42-
run: dotnet nuget add source --username ${{ secrets.PUBLISH_GITHUB_USERNAME }} --password ${{ secrets.PUBLISH_GITHUB_PACKAGE_API_KEY }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/transmitly/index.json"
43-
- name: Publish (Github)
44-
run: dotnet nuget push src\${{env.channelProviderName}}\bin\${{env.buildConfiguration}}\${{env.channelProviderName}}*.nupkg --api-key ${{secrets.PUBLISH_GITHUB_PACKAGE_API_KEY}} --source "github"
13+
build_test_deploy_channel_provider:
14+
uses: transmitly/transmitly/.github/workflows/release-channel-provider.yml@main
15+
with:
16+
channelProviderName: Transmitly.Microsoft.Aspnet.Mvc
17+
secrets: inherit
18+

0 commit comments

Comments
 (0)