Skip to content

Commit

Permalink
Merge pull request #4 from 345paul/feat/update-refs
Browse files Browse the repository at this point in the history
Updated CI workflow and updated nuget references
  • Loading branch information
probertdaniel authored Oct 27, 2020
2 parents 854ece6 + bdcd6cd commit 101dbf1
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 49 deletions.
40 changes: 6 additions & 34 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@ on:
branches:
- 'main'
release:
types: [created]
schedule:
- cron: '0 3 * * 3'
types: [published]

env:
BUILD_TYPE: 'Release'
DOTNET_VERSION: '3.1.200'
CHOCO_BIZTALK_MIGRATOR_PACKAGE: '..\..\build\chocolatey\biztalkmigrator\biztalkmigrator.nuspec'
CHOCO_CONFIG_DIR: 'build/chocolatey'
CHOCO_PACKAGE_OUTPUT_DIR: 'choco-package'
CHOCO_PACKAGE_REPO_INTERNAL: 'https://push.chocolatey.org/'
CHOCO_PACKAGE_REPO_PUBLIC: 'https://push.chocolatey.org/'
CHOCO_PACKAGE_REPO_FOLDER: 'chocolatey-packages'
CHOCO_SRC_DIR: 'choco-src'
Expand Down Expand Up @@ -53,8 +50,8 @@ jobs:
if: github.event_name == 'push' || github.event_name == 'pull_request'
uses: actions/checkout@v2

- name: Checkout from main branch
if: github.event_name == 'schedule'
- name: Checkout from main branch
if: github.event_name == 'release'
uses: actions/checkout@v2
with:
ref: main
Expand All @@ -66,7 +63,7 @@ jobs:

# Note: 2 version numbers are created, semantic versioning 1 for Chocolatey and semantic versioning 2 for NuGet.
- name: Set the version number suffix
if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'schedule'
if: github.event_name == 'push' || github.event_name == 'pull_request'
shell: bash
run: |
seconds_at_midnight=$(date --utc -d 'today 00:00:00' +"%s")
Expand All @@ -85,12 +82,6 @@ jobs:
- name: Update the nuget config with the credentials for the GitHub Package Repository
run: dotnet nuget update source ${{ env.NUGET_SOURCE_NAME }} --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}

- name: Update the Chocolatey dependencies for scheduled builds
if: github.event_name == 'schedule'
shell: powershell
run: |
.\build\scripts\Update-ChocolateyPackageVersionNumbers.ps1 -nuspecFileName "${{ env.CHOCO_BIZTALK_MIGRATOR_PACKAGE }}" -chocoSource ${{ secrets.AIM_CHOCO_PUBLIC_REPO_PRE_AUTHENTICATED_URL }}
- name: Restore project dependencies
run: dotnet restore

Expand Down Expand Up @@ -144,28 +135,9 @@ jobs:
choco pack $f --version=${{ env.VERSION_NUMBER_SEM1 }} --outputdirectory ./${{ env.OUTPUT_DIR }}/${{ env.CHOCO_PACKAGE_OUTPUT_DIR }}
done
- name: Push the Chocolatey package to the internal repo
- name: Push the Chocolatey package to the public repo
if: github.event_name == 'release' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
shell: bash
run: |
find ./${{ env.OUTPUT_DIR }}/${{ env.CHOCO_PACKAGE_OUTPUT_DIR }}/ -name "*.nupkg" |
while read f; do
retryCount=0
while true; do
choco push $f -s ${{ env.CHOCO_PACKAGE_REPO_INTERNAL }} -k ${{ secrets.AIM_CHOCO_INTERNAL_REPO_TOKEN }} && break
retryCount=$((retryCount+1))
if (( "$retryCount" <= ${{ env.SCRIPT_MAX_RETRIES }} )); then
echo "Retrying the processing of $f"
sleep ${{ env.SCRIPT_RETRY_SLEEP_IN_SECONDS }}
else
break
fi
done
done
- name: Push the Chocolatey package to the publicly shared repo
if: github.event_name == 'schedule'
shell: bash
run: |
find ./${{ env.OUTPUT_DIR }}/${{ env.CHOCO_PACKAGE_OUTPUT_DIR }}/ -name "*.nupkg" |
while read f; do
Expand All @@ -174,7 +146,7 @@ jobs:
choco push $f -s ${{ env.CHOCO_PACKAGE_REPO_PUBLIC }} -k ${{ secrets.AIM_CHOCO_PUBLIC_REPO_TOKEN }} && break
retryCount=$((retryCount+1))
if (( "$retryCount" <= ${{ env.SCRIPT_MAX_RETRIES }} )); then
echo "Retrying the processing of $f"
echo "Retrying the processing of $f"
sleep ${{ env.SCRIPT_RETRY_SLEEP_IN_SECONDS }}
else
break
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.3.0-alpha.2020100157976" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.6.0-beta1-20111-10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.3.0-alpha.2020100157976" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.6.0-beta1-20111-10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.3.0-alpha.2020100157976" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.6.0-beta1-20111-10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.3.0-alpha.2020100157976" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.6.0-beta1-20111-10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<ItemGroup>
<PackageReference Include="HtmlAgilityPack" Version="1.11.24" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.3.0-alpha.2020100157976" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.6.0-beta1-20111-10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.3.0-alpha.2020100157976" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.Runner" Version="0.2.0-alpha.2020100155692" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.5.0" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.Runner" Version="0.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.6.0-beta1-20111-10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.3.0-alpha.2020100157976" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.6.0-beta1-20111-10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.3.0-alpha.2020100157976" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.6.0-beta1-20111-10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.3.0-alpha.2020100157976" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.6.0-beta1-20111-10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.3.0-alpha.2020100157976" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.6.0-3.20181.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.3.0-alpha.2020100157976" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.6.0-3.20181.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.3.0-alpha.2020100157976" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.6.0-beta1-20111-10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<ItemGroup>
<PackageReference Include="HtmlAgilityPack" Version="1.11.24" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.3.0-alpha.2020100157976" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.6.0-beta1-20111-10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.3.0-alpha.2020100157976" />
<PackageReference Include="Microsoft.AzureIntegrationMigration.ApplicationModel" Version="0.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.6.0-beta1-20111-10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit 101dbf1

Please sign in to comment.