Skip to content

Commit f63e2c2

Browse files
authored
Merge pull request #21 from PHOENIXCONTACT/fix/workflow-file
Use MyGet or NuGet token based on target branch
2 parents 22330f4 + d5b8289 commit f63e2c2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

β€Ž.github/workflows/.build-and-publish.ymlβ€Ž

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,20 @@ jobs:
9292
run: cp -r artifacts/build artifacts/Licensing
9393
if: ${{ github.ref_name == 'dev' || github.ref_name == 'future' || (startsWith(github.ref, 'refs/tags/v')) }}
9494

95-
- name: πŸ“¦ Create Packages and 🚚 deliver
95+
- name: πŸ“¦ Create Packages and 🚚 deliver to NuGet
96+
run: |
97+
.\set-version.ps1 -RefName ${{ github.ref_name }} -IsTag ${{ github.ref_type == 'tag' && 1 || 0 }} -BuildNumber ${{ github.run_number }} -CommitHash ${{ github.sha }}
98+
.\pack-publish.ps1 -NugetApiKey ${{ secrets.NUGET_TOKEN }} -PackageTarget ${{ needs.Variables.outputs.MORYX_PACKAGE_TARGET }}
99+
shell: pwsh
100+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
101+
102+
103+
- name: πŸ“¦ Create Packages and 🚚 deliver to MyGet
96104
run: |
97105
.\set-version.ps1 -RefName ${{ github.ref_name }} -IsTag ${{ github.ref_type == 'tag' && 1 || 0 }} -BuildNumber ${{ github.run_number }} -CommitHash ${{ github.sha }}
98106
.\pack-publish.ps1 -NugetApiKey ${{ secrets.MYGET_TOKEN }} -PackageTarget ${{ needs.Variables.outputs.MORYX_PACKAGE_TARGET }}
99107
shell: pwsh
100-
if: ${{ github.ref_name == 'dev' || github.ref_name == 'future' || (startsWith(github.ref, 'refs/tags/v')) }}
108+
if: ${{ github.ref_name == 'dev' || github.ref_name == 'future' }}
101109

102110
- name: ⬆️ Upload build artifacts
103111
uses: actions/upload-artifact@v4

0 commit comments

Comments
Β (0)