Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop to Main - Publish 2.0 #24

Merged
merged 13 commits into from
May 3, 2022
7 changes: 6 additions & 1 deletion .github/workflows/dev-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
with:
fetch-depth: 0

- name: Echo Branch Name
run: echo "Branch name is $GITHUB_REF_NAME "
#if: ${{ github.ref == 'refs/heads/main' }}

- name: Get version
id: get_version
uses: greenygh0st/net-proj-release-version@v1
Expand Down Expand Up @@ -95,6 +99,7 @@ jobs:


- name: Push to Nuget
if: ${{ steps.detect_develop.outcome == 'success' }}
# if: ${{ steps.detect_develop.outcome == 'success' }}
if: ${{ github.ref == 'refs/heads/Develop' }}
# run: dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.FAKEAUTH_NUGET_KEY}}
run: dotnet nuget push FakeAuth.${{steps.get_version.outputs.RELEASE_VERSION}}-ci-${BUILD_NUMBER}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.FAKEAUTH_NUGET_KEY}}
14 changes: 6 additions & 8 deletions .github/workflows/main-ci-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
fetch-depth: 0

- name: Detect if workflow is running on origin/Develop
- name: Detect if workflow is running on origin/main
id: detect_main
run: git rev-parse HEAD | grep $(git rev-parse origin/main)
continue-on-error: true
Expand Down Expand Up @@ -56,10 +56,6 @@ jobs:
with:
token: ${{secrets.github_token}}

- name: Print new build number
run: echo "Build number is ${BUILD_NUMBER}"
# Or, if you're on Windows: echo "Build number is ${env:BUILD_NUMBER}"

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
Expand All @@ -76,8 +72,10 @@ jobs:

- name: Pack
run: dotnet pack --configuration Release /p:Version=${{steps.get_version.outputs.RELEASE_VERSION}} --include-symbols --output .
if: ${{ steps.main_main.outcome == 'success' }}

if: ${{ github.ref == 'refs/heads/main' }}
#if: ${{ steps.main_main.outcome == 'success' }}

- name: Push to Nuget
run: dotnet nuget push FakeAuth.${{steps.get_version.outputs.RELEASE_VERSION}}.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{secrets.FAKEAUTH_NUGET_KEY}}
if: ${{ steps.main_main.outcome == 'success' }}
if: ${{ github.ref == 'refs/heads/main' }}
#if: ${{ steps.main_main.outcome == 'success' }}