|
13 | 13 | ENABLED_MULTI_STAGE_BUILD: true
|
14 | 14 | ENABLED_UNIT_TESTS: true
|
15 | 15 | ENABLED_PUBLISH_DOCKER: true
|
| 16 | + ENABLED_PUBLISH_GEM: true |
| 17 | + ENABLED_PUBLISH_NUGET: true |
| 18 | + ENABLED_PUBLISH_CHOCOLATEY: true |
16 | 19 |
|
17 | 20 | jobs:
|
18 | 21 | build:
|
@@ -155,3 +158,43 @@ jobs:
|
155 | 158 | - name: '[Docker build & Test]'
|
156 | 159 | shell: pwsh
|
157 | 160 | 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