From 2749fdc2e9cd4eb97abf522b76c4fe57b4adf69c Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Wed, 17 Jun 2020 12:10:12 -0600 Subject: [PATCH] update workflows for name change --- .github/scripts/GenerateVersionNumber.ps1 | 4 ++-- .github/workflows/docker.yml | 8 ++++---- .github/workflows/master.yml | 22 +++++++++++----------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/scripts/GenerateVersionNumber.ps1 b/.github/scripts/GenerateVersionNumber.ps1 index d9406eea..75a18d37 100644 --- a/.github/scripts/GenerateVersionNumber.ps1 +++ b/.github/scripts/GenerateVersionNumber.ps1 @@ -1,4 +1,4 @@ -$latestVersions = $(git tag --merged origin/master) +$latestVersions = $(git tag --merged origin/main) $latestVersion = [version]"0.0.0" Foreach ($version in $latestVersions) { Write-Host $version @@ -18,7 +18,7 @@ $newVersion = [version]$latestVersion $phase = "" $newVersionString = "" switch -regex ($Env:GITHUB_REF) { - '^refs\/heads\/master*.' { + '^refs\/heads\/main*.' { $newVersionString = "{0}.{1}.{2}" -f $newVersion.Major, $newVersion.Minor, $newVersion.Build } '^refs\/heads\/feature\/*.' { diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index af91840c..3eb3e42e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -18,8 +18,8 @@ env: VERSION: 0.0.0-buildtype-buildnumber # Defaults to debug for build type BUILD_TYPE: Debug - # Defaults to master as the release branch. Change as necessary - RELEASE_BRANCH: master + # Defaults to main as the release branch. Change as necessary + RELEASE_BRANCH: main jobs: Build_Project: runs-on: windows-latest @@ -189,11 +189,11 @@ jobs: run: git push --tags origin - name: Check Directory run: Get-ChildItem ./ - # This step only runs if the branch is master or release/ runs and pushes the build to the public build repo + # This step only runs if the branch is main or release/ runs and pushes the build to the public build repo Public_Push_Output: needs: Build_Project runs-on: windows-latest - if: contains(github.ref, 'master') || contains(github.ref, '/release/') + if: contains(github.ref, 'main') || contains(github.ref, '/release/') steps: # Checkout the repo - name: check Github ref diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index a928d031..7bbbd646 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -1,11 +1,11 @@ -name: Master Build using Docker +name: main Build using Docker on: release: types: - created branches: - - master + - main env: # solution path doesn't need slashes unless there it is multiple folders deep # solution name does not include extension. .sln is assumed @@ -15,8 +15,8 @@ env: VERSION: 0.0.0-buildtype-buildnumber # Defaults to debug for build type BUILD_TYPE: Release - # Defaults to master as the release branch. Change as necessary - RELEASE_BRANCH: master + # Defaults to main as the release branch. Change as necessary + RELEASE_BRANCH: main jobs: Build_Project: runs-on: windows-latest @@ -114,8 +114,8 @@ jobs: Remove-Item -Path ./Version/version.txt Remove-Item -Path ./Version # Checkout/Create the branch - - name: Checkout Master branch - run: git checkout master + - name: Checkout main branch + run: git checkout main # Download the build output into the repo - name: Download Build output uses: actions/download-artifact@v1 @@ -151,13 +151,13 @@ jobs: # Push the commit - name: Push to Builds Repo shell: powershell - run: git push -u origin master --force + run: git push -u origin main --force # Push the tags - name: Push tags run: git push --tags origin - name: Check Directory run: Get-ChildItem ./ - # This step only runs if the branch is master or release/ runs and pushes the build to the public build repo + # This step only runs if the branch is main or release/ runs and pushes the build to the public build repo Public_Push_Output: needs: Build_Project runs-on: windows-latest @@ -186,9 +186,9 @@ jobs: Write-Output "::set-env name=VERSION::$version" Remove-Item -Path ./Version/version.txt Remove-Item -Path ./Version - # Checkout master branch + # Checkout main branch - name: Create new branch - run: git checkout master + run: git checkout main # Download the build output into the repo - name: Download Build output uses: actions/download-artifact@v1 @@ -224,7 +224,7 @@ jobs: # Push the commit - name: Push to Builds Repo shell: powershell - run: git push -u origin master --force + run: git push -u origin main --force # Push the tags - name: Push tags run: git push --tags origin