Skip to content

Commit 57473b2

Browse files
CI for the pre-release branch
1 parent 456f544 commit 57473b2

File tree

1 file changed

+28
-21
lines changed

1 file changed

+28
-21
lines changed

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

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ on:
66
branches:
77
- dev
88
- future
9+
- pre-release
910
tags:
1011
- v[0-9]+.[0-9]+.[0-9]+ # Matches all semantic versioning tags with major, minor, patch
1112
pull_request:
1213
branches:
1314
- dev
1415
- future
16+
- pre-release
1517

1618
env:
1719
dotnet_sdk_version: '8.0.100'
@@ -74,25 +76,30 @@ jobs:
7476
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
7577
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
7678

77-
# currently not working
78-
# Documentation:
79-
# needs: [EnvVar, UnitTests]
80-
# uses: phoenixcontact/tools/.github/workflows/documentation-tool.yml@main
81-
# with:
82-
# REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}
83-
8479
Publish:
85-
needs: [EnvVar, UnitTests]
86-
uses: phoenixcontact/tools/.github/workflows/publish-tool.yml@main
87-
with:
88-
dotnet_sdk_version: ${{ needs.EnvVar.outputs.dotnet_sdk_version }}
89-
REPOSITORY_NAME: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}
90-
MORYX_PACKAGE_TARGET_DEV: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_DEV }}
91-
MORYX_PACKAGE_TARGET_V3_DEV: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_V3_DEV }}
92-
MORYX_PACKAGE_TARGET_FUTURE: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_FUTURE }}
93-
MORYX_PACKAGE_TARGET_V3_FUTURE: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_V3_FUTURE }}
94-
MORYX_PACKAGE_TARGET_RELEASE: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_RELEASE }}
95-
MORYX_PACKAGE_TARGET_V3_RELEASE: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_V3_RELEASE }}
96-
secrets:
97-
MYGET_TOKEN: ${{secrets.MYGET_TOKEN}}
98-
NUGET_TOKEN: ${{secrets.NUGET_TOKEN}}
80+
if: ${{ github.ref == 'refs/heads/pre-release' }}
81+
needs: [EnvVar, UnitTests]
82+
runs-on: ubuntu-latest
83+
env:
84+
MORYX_NUGET_APIKEY: ${{ secrets.MYGET_TOKEN }}
85+
MORYX_PACKAGE_TARGET: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_DEV }}
86+
MORYX_PACKAGE_TARGET_V3: ${{ needs.EnvVar.outputs.MORYX_PACKAGE_TARGET_V3_DEV }}
87+
steps:
88+
- uses: actions/checkout@v2
89+
90+
- name: Setup .NET SDK
91+
uses: actions/setup-dotnet@v1
92+
with:
93+
dotnet-version: ${{ needs.EnvVar.outputs.dotnet_sdk_version }}
94+
95+
- name: Setup NuGet
96+
uses: NuGet/setup-nuget@v1
97+
98+
- name: Download package artifacts
99+
uses: actions/download-artifact@v4
100+
with:
101+
name: ${{ needs.EnvVar.outputs.REPOSITORY_NAME }}-packages
102+
path: artifacts/packages/
103+
104+
- name: Publish on MyGet-CI
105+
run: dotnet nuget push artifacts/packages/*.nupkg --api-key $MORYX_NUGET_APIKEY --source $MORYX_PACKAGE_TARGET --skip-duplicate --symbol-api-key $MORYX_NUGET_APIKEY --symbol-source $MORYX_PACKAGE_TARGET_V3

0 commit comments

Comments
 (0)