Merge pull request #260 from PepperDash/feature/update-workflows-for-name-change

Update workflows for name change
This commit is contained in:
Andrew Welker
2020-06-17 12:34:31 -06:00
committed by GitHub
3 changed files with 17 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
$latestVersions = $(git tag --merged origin/master) $latestVersions = $(git tag --merged origin/main)
$latestVersion = [version]"0.0.0" $latestVersion = [version]"0.0.0"
Foreach ($version in $latestVersions) { Foreach ($version in $latestVersions) {
Write-Host $version Write-Host $version
@@ -18,7 +18,7 @@ $newVersion = [version]$latestVersion
$phase = "" $phase = ""
$newVersionString = "" $newVersionString = ""
switch -regex ($Env:GITHUB_REF) { switch -regex ($Env:GITHUB_REF) {
'^refs\/heads\/master*.' { '^refs\/heads\/main*.' {
$newVersionString = "{0}.{1}.{2}" -f $newVersion.Major, $newVersion.Minor, $newVersion.Build $newVersionString = "{0}.{1}.{2}" -f $newVersion.Major, $newVersion.Minor, $newVersion.Build
} }
'^refs\/heads\/feature\/*.' { '^refs\/heads\/feature\/*.' {

View File

@@ -18,8 +18,8 @@ env:
VERSION: 0.0.0-buildtype-buildnumber VERSION: 0.0.0-buildtype-buildnumber
# Defaults to debug for build type # Defaults to debug for build type
BUILD_TYPE: Debug BUILD_TYPE: Debug
# Defaults to master as the release branch. Change as necessary # Defaults to main as the release branch. Change as necessary
RELEASE_BRANCH: master RELEASE_BRANCH: main
jobs: jobs:
Build_Project: Build_Project:
runs-on: windows-latest runs-on: windows-latest
@@ -189,11 +189,11 @@ jobs:
run: git push --tags origin run: git push --tags origin
- name: Check Directory - name: Check Directory
run: Get-ChildItem ./ 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: Public_Push_Output:
needs: Build_Project needs: Build_Project
runs-on: windows-latest runs-on: windows-latest
if: contains(github.ref, 'master') || contains(github.ref, '/release/') if: contains(github.ref, 'main') || contains(github.ref, '/release/')
steps: steps:
# Checkout the repo # Checkout the repo
- name: check Github ref - name: check Github ref

View File

@@ -1,11 +1,11 @@
name: Master Build using Docker name: main Build using Docker
on: on:
release: release:
types: types:
- created - created
branches: branches:
- master - main
env: env:
# solution path doesn't need slashes unless there it is multiple folders deep # solution path doesn't need slashes unless there it is multiple folders deep
# solution name does not include extension. .sln is assumed # solution name does not include extension. .sln is assumed
@@ -15,8 +15,8 @@ env:
VERSION: 0.0.0-buildtype-buildnumber VERSION: 0.0.0-buildtype-buildnumber
# Defaults to debug for build type # Defaults to debug for build type
BUILD_TYPE: Release BUILD_TYPE: Release
# Defaults to master as the release branch. Change as necessary # Defaults to main as the release branch. Change as necessary
RELEASE_BRANCH: master RELEASE_BRANCH: main
jobs: jobs:
Build_Project: Build_Project:
runs-on: windows-latest runs-on: windows-latest
@@ -114,8 +114,8 @@ jobs:
Remove-Item -Path ./Version/version.txt Remove-Item -Path ./Version/version.txt
Remove-Item -Path ./Version Remove-Item -Path ./Version
# Checkout/Create the branch # Checkout/Create the branch
- name: Checkout Master branch - name: Checkout main branch
run: git checkout master run: git checkout main
# Download the build output into the repo # Download the build output into the repo
- name: Download Build output - name: Download Build output
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1
@@ -151,13 +151,13 @@ jobs:
# Push the commit # Push the commit
- name: Push to Builds Repo - name: Push to Builds Repo
shell: powershell shell: powershell
run: git push -u origin master --force run: git push -u origin main --force
# Push the tags # Push the tags
- name: Push tags - name: Push tags
run: git push --tags origin run: git push --tags origin
- name: Check Directory - name: Check Directory
run: Get-ChildItem ./ 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: Public_Push_Output:
needs: Build_Project needs: Build_Project
runs-on: windows-latest runs-on: windows-latest
@@ -186,9 +186,9 @@ jobs:
Write-Output "::set-env name=VERSION::$version" Write-Output "::set-env name=VERSION::$version"
Remove-Item -Path ./Version/version.txt Remove-Item -Path ./Version/version.txt
Remove-Item -Path ./Version Remove-Item -Path ./Version
# Checkout master branch # Checkout main branch
- name: Create new branch - name: Create new branch
run: git checkout master run: git checkout main
# Download the build output into the repo # Download the build output into the repo
- name: Download Build output - name: Download Build output
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1
@@ -224,7 +224,7 @@ jobs:
# Push the commit # Push the commit
- name: Push to Builds Repo - name: Push to Builds Repo
shell: powershell shell: powershell
run: git push -u origin master --force run: git push -u origin main --force
# Push the tags # Push the tags
- name: Push tags - name: Push tags
run: git push --tags origin run: git push --tags origin