Skip to content

Commit

Permalink
Automatically build and release the CLI for the windows-386 build t…
Browse files Browse the repository at this point in the history
…arget (github#797)
  • Loading branch information
timrogers authored Feb 3, 2023
1 parent a4d4c84 commit 2a32819
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,11 @@ jobs:
body_path: ./RELEASENOTES.md
files: |
./dist/ado2gh.*.win-x64.zip
./dist/ado2gh.*.win-x86.zip
./dist/ado2gh.*.linux-x64.tar.gz
./dist/ado2gh.*.osx-x64.tar.gz
./dist/win-x64/gei-windows-amd64.exe
./dist/win-x86/gei-windows-386.exe
./dist/linux-x64/gei-linux-amd64
./dist/osx-x64/gei-darwin-amd64
Expand All @@ -290,6 +292,7 @@ jobs:
repository: github/gh-ado2gh
token: ${{ secrets.PUBLISH_ADO2GH_TOKEN }}
files: |
./dist/win-x86/ado2gh-windows-386.exe
./dist/win-x64/ado2gh-windows-amd64.exe
./dist/linux-x64/ado2gh-linux-amd64
./dist/osx-x64/ado2gh-darwin-amd64
Expand All @@ -301,6 +304,7 @@ jobs:
repository: github/gh-bbs2gh
token: ${{ secrets.PUBLISH_BBS2GH_TOKEN }}
files: |
./dist/win-x86/bbs2gh-windows-386.exe
./dist/win-x64/bbs2gh-windows-amd64.exe
./dist/linux-x64/bbs2gh-linux-amd64
./dist/osx-x64/bbs2gh-darwin-amd64
Expand Down
1 change: 1 addition & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Added support for x86 Windows machines with new `windows-386` build
- Added logic to check if a target repo exists before generating GHES archives
- Fixed reclaiming a single mannequin using `reclaim-mannequin` with the `--mannequin-user` and `--target-user` parameters
- Added logic to ensure target org exists before generating GHES archives
38 changes: 38 additions & 0 deletions publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ else {
}

Copy-Item ./dist/win-x64/ado2gh.exe ./dist/win-x64/ado2gh-windows-amd64.exe

dotnet publish src/ado2gh/ado2gh.csproj -c Release -o dist/win-x86/ -r win-x86 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true /p:DebugType=None /p:IncludeNativeLibrariesForSelfExtract=true /p:VersionPrefix=$AssemblyVersion

if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}

Compress-Archive -Path ./dist/win-x86/ado2gh.exe -DestinationPath ./dist/ado2gh.$AssemblyVersion.win-x86.zip -Force

if (Test-Path -Path ./dist/win-x86/ado2gh-windows-386.exe) {
Remove-Item ./dist/win-x86/ado2gh-windows-386.exe
}

Copy-Item ./dist/win-x86/ado2gh.exe ./dist/win-x86/ado2gh-windows-386.exe
}

if ((Test-Path env:SKIP_LINUX) -And $env:SKIP_LINUX.ToUpper() -eq "TRUE") {
Expand Down Expand Up @@ -83,6 +97,18 @@ else {
}

Rename-Item ./dist/win-x64/gei.exe gei-windows-amd64.exe

dotnet publish src/gei/gei.csproj -c Release -o dist/win-x86/ -r win-x86 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true /p:DebugType=None /p:IncludeNativeLibrariesForSelfExtract=true /p:VersionPrefix=$AssemblyVersion

if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}

if (Test-Path -Path ./dist/win-x86/gei-windows-386.exe) {
Remove-Item ./dist/win-x86/gei-windows-386.exe
}

Rename-Item ./dist/win-x86/gei.exe gei-windows-386.exe
}

if ((Test-Path env:SKIP_LINUX) -And $env:SKIP_LINUX.ToUpper() -eq "TRUE") {
Expand Down Expand Up @@ -135,6 +161,18 @@ else {
}

Rename-Item ./dist/win-x64/bbs2gh.exe bbs2gh-windows-amd64.exe

dotnet publish src/bbs2gh/bbs2gh.csproj -c Release -o dist/win-x86/ -r win-x86 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true /p:DebugType=None /p:IncludeNativeLibrariesForSelfExtract=true /p:VersionPrefix=$AssemblyVersion

if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}

if (Test-Path -Path ./dist/win-x86/bbs2gh-windows-386.exe) {
Remove-Item ./dist/win-x86/bbs2gh-windows-386.exe
}

Rename-Item ./dist/win-x86/bbs2gh.exe bbs2gh-windows-386.exe
}

if ((Test-Path env:SKIP_LINUX) -And $env:SKIP_LINUX.ToUpper() -eq "TRUE") {
Expand Down

0 comments on commit 2a32819

Please sign in to comment.