Skip to content

Commit 19a38d2

Browse files
committed
(GH-2028) Added publish step for GH Actions
1 parent b07bd27 commit 19a38d2

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/build.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ env:
1313
ENABLED_MULTI_STAGE_BUILD: true
1414
ENABLED_UNIT_TESTS: true
1515
ENABLED_PUBLISH_DOCKER: true
16+
ENABLED_PUBLISH_GEM: true
17+
ENABLED_PUBLISH_NUGET: true
18+
ENABLED_PUBLISH_CHOCOLATEY: true
1619

1720
jobs:
1821
build:
@@ -155,3 +158,43 @@ jobs:
155158
- name: '[Docker build & Test]'
156159
shell: pwsh
157160
run: ./build.ps1 -target Publish-DockerHub -DockerDistro ${{ matrix.distro }} -DockerDotnetVersion ${{ matrix.targetFramework }}
161+
162+
publish:
163+
name: Publish
164+
needs: [artifact_test]
165+
runs-on: windows-latest
166+
strategy:
167+
matrix:
168+
taskName: [CI, NuGet, Chocolatey, Gem, Documentation]
169+
fail-fast: false
170+
env:
171+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
173+
NUGET_API_URL: ${{ secrets.NUGET_API_URL }}
174+
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
175+
CHOCOLATEY_API_URL: ${{ secrets.CHOCOLATEY_API_URL }}
176+
RUBY_GEM_API_KEY: ${{ secrets.RUBY_GEM_API_KEY }}
177+
steps:
178+
- uses: actions/checkout@v2
179+
- name: Fetch all history for all tags and branches
180+
run: |
181+
git fetch --prune --unshallow
182+
- name: Cache tools
183+
id: cache-tools
184+
uses: actions/cache@v1
185+
with:
186+
path: tools
187+
key: ${{ runner.os }}-tools-${{ hashFiles('build.cake') }}
188+
- name: Cache dotnet
189+
id: cache-dotnet
190+
uses: actions/cache@v1
191+
with:
192+
path: .dotnet
193+
key: ${{ runner.os }}-dotnet-${{ hashFiles('build.config') }}
194+
- uses: actions/download-artifact@v1
195+
with:
196+
name: storage
197+
path: ${{ github.workspace }}/artifacts
198+
- name: '[Publish]'
199+
shell: pwsh
200+
run: ./build.ps1 -target Publish-${{ matrix.taskName }}

0 commit comments

Comments
 (0)