Skip to content

Commit de28bd9

Browse files
authored
Release v2.2.0 (#1306)
**Changes:** - Use in-proc methods for getting OS version number (#1240, #1264) - Update System.CommandLine (#1265) - Suppress GUI from command-line argument (#1267) - Add github (login|logout|list) commands (#1267) - cURL Cookie file support (#1251) - Update target framework on Mac/Linux to .NET 7 (#1274, #1282) - Replace JSON.NET with System.Text.Json (#1274) - Preserve exact redirect URI formatting in OAuth requests (#1281) - Use IP localhost redirect for GitHub (#1286) - Use WWW-Authenticate headers from Git for Azure Repos authority (#1288) - Better GitHub Enterprise Managed User (EMU) account support (#1190)
2 parents 49345c1 + 8e3867f commit de28bd9

File tree

124 files changed

+3580
-821
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+3580
-821
lines changed
Lines changed: 108 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,132 @@
1-
name: GCM
1+
name: ci
22

33
on:
44
workflow_dispatch:
55
push:
6-
branches: [ main, linux ]
6+
branches: [ main ]
77
pull_request:
8-
branches: [ main, linux ]
8+
branches: [ main ]
99

1010
jobs:
11-
validate_gcm:
12-
name: "CI"
13-
14-
runs-on: ${{ matrix.os }}
15-
strategy:
16-
matrix:
17-
os: [ubuntu-latest, windows-latest, macos-latest]
11+
# ================================
12+
# Windows
13+
# ================================
14+
windows:
15+
name: Windows
16+
runs-on: windows-latest
1817

1918
steps:
2019
- uses: actions/checkout@v3
2120

2221
- name: Setup .NET
23-
uses: actions/setup-dotnet@v3.0.3
22+
uses: actions/setup-dotnet@v3.2.0
2423
with:
2524
dotnet-version: 6.0.201
2625

2726
- name: Install dependencies
2827
run: dotnet restore
2928

30-
- name: Build Windows
31-
if: contains(matrix.os, 'windows')
29+
- name: Build
3230
run: dotnet build --configuration WindowsRelease
3331

34-
- name: Build Linux
35-
if: contains(matrix.os, 'ubuntu')
32+
- name: Test
33+
run: |
34+
dotnet test --verbosity normal --configuration=WindowsRelease
35+
36+
- name: Prepare artifacts
37+
shell: bash
38+
run: |
39+
mkdir -p artifacts/bin
40+
mv out/windows/Installer.Windows/bin/Release/net472/win-x86 artifacts/bin/
41+
cp out/windows/Installer.Windows/bin/Release/net472/win-x86.sym/* artifacts/bin/win-x86/
42+
mv out/windows/Installer.Windows/bin/Release/net472/gcm*.exe artifacts/
43+
44+
- name: Upload artifacts
45+
uses: actions/upload-artifact@v3
46+
with:
47+
name: win-x86
48+
path: |
49+
artifacts
50+
51+
# ================================
52+
# Linux
53+
# ================================
54+
linux:
55+
name: Linux
56+
runs-on: ubuntu-latest
57+
58+
steps:
59+
- uses: actions/checkout@v3
60+
61+
- name: Setup .NET
62+
uses: actions/[email protected]
63+
with:
64+
dotnet-version: 6.0.201
65+
66+
- name: Install dependencies
67+
run: dotnet restore
68+
69+
- name: Build
3670
run: dotnet build --configuration LinuxRelease
3771

38-
- name: Build macOS
39-
if: contains(matrix.os, 'macos')
40-
run: dotnet build --configuration MacRelease
72+
- name: Test
73+
run: |
74+
dotnet test --verbosity normal --configuration=LinuxRelease
75+
76+
- name: Prepare artifacts
77+
run: |
78+
mkdir -p artifacts
79+
mv out/linux/Packaging.Linux/Release/deb/*.deb artifacts/
80+
mv out/linux/Packaging.Linux/Release/tar/*.tar.gz artifacts/
81+
82+
- name: Upload artifacts
83+
uses: actions/upload-artifact@v3
84+
with:
85+
name: linux-x64
86+
path: |
87+
artifacts
88+
89+
# ================================
90+
# macOS
91+
# ================================
92+
osx:
93+
name: macOS
94+
runs-on: macos-latest
95+
strategy:
96+
matrix:
97+
runtime: [ osx-x64, osx-arm64 ]
98+
99+
steps:
100+
- uses: actions/checkout@v3
101+
102+
- name: Setup .NET
103+
uses: actions/[email protected]
104+
with:
105+
dotnet-version: 6.0.201
106+
107+
- name: Install dependencies
108+
run: dotnet restore
109+
110+
- name: Build
111+
run: |
112+
dotnet build src/osx/Installer.Mac/*.csproj \
113+
--configuration=Release --no-self-contained \
114+
--runtime=${{ matrix.runtime }}
41115
42116
- name: Test
43-
run: dotnet test --verbosity normal
117+
run: |
118+
dotnet test --verbosity normal --configuration=MacRelease
119+
120+
- name: Prepare artifacts
121+
run: |
122+
mkdir -p artifacts/bin
123+
mv out/osx/Installer.Mac/pkg/Release/payload "artifacts/bin/${{ matrix.runtime }}"
124+
cp out/osx/Installer.Mac/pkg/Release/payload.sym/* "artifacts/bin/${{ matrix.runtime }}/"
125+
mv out/osx/Installer.Mac/pkg/Release/gcm*.pkg artifacts/
126+
127+
- name: Upload artifacts
128+
uses: actions/upload-artifact@v3
129+
with:
130+
name: ${{ matrix.runtime }}
131+
path: |
132+
artifacts

.github/workflows/lint-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v3
2222

23-
- uses: DavidAnson/markdownlint-cli2-action@bb4bb94c73936643d73d345b48fead3e96f90a5e
23+
- uses: DavidAnson/markdownlint-cli2-action@8f3516061301755c97ff833a8e933f09282cc5b5
2424
with:
2525
globs: |
2626
"**/*.md"
@@ -35,7 +35,7 @@ jobs:
3535
- name: Run link checker
3636
# For any troubleshooting, see:
3737
# https://github.com/lycheeverse/lychee/blob/master/docs/TROUBLESHOOTING.md
38-
uses: lycheeverse/lychee-action@97189f2c0a3c8b0cb0e704fd4e878af6e5e2b2c5
38+
uses: lycheeverse/lychee-action@ec3ed119d4f44ad2673a7232460dc7dff59d2421
3939

4040
with:
4141
# user-agent: if a user agent is not specified, some websites (e.g.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: release-dotnet-tool
2+
on:
3+
release:
4+
types: [released]
5+
6+
jobs:
7+
release:
8+
runs-on: windows-latest
9+
environment: release
10+
steps:
11+
- name: Download NuGet package from release and publish
12+
run: |
13+
# Get asset information
14+
$github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json
15+
$asset = $github.release.assets | Where-Object -Property name -match '.nupkg$'
16+
17+
# Download asset
18+
Invoke-WebRequest -Uri $asset.browser_download_url -OutFile $asset.name
19+
20+
# Publish asset
21+
dotnet nuget push $asset.name --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
22+
shell: powershell

.github/workflows/release-homebrew.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
jobs:
77
release:
88
runs-on: ubuntu-latest
9+
environment: release
910
steps:
1011
- name: Update Homebrew tap
1112
uses: mjcheetham/[email protected]

.github/workflows/release.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ jobs:
1010
osx-build:
1111
name: Build macOS
1212
runs-on: macos-latest
13+
environment: release
1314
strategy:
1415
matrix:
1516
runtime: [ osx-x64, osx-arm64 ]
1617
steps:
1718
- uses: actions/checkout@v3
1819

1920
- name: Set up dotnet
20-
uses: actions/setup-dotnet@v3.0.3
21+
uses: actions/setup-dotnet@v3.2.0
2122
with:
2223
dotnet-version: 6.0.201
2324

@@ -70,6 +71,7 @@ jobs:
7071
name: Sign macOS payload
7172
# ESRP service requires signing to run on Windows
7273
runs-on: windows-latest
74+
environment: release
7375
strategy:
7476
matrix:
7577
runtime: [ osx-x64, osx-arm64 ]
@@ -140,7 +142,7 @@ jobs:
140142
run: echo "VERSION=$(cat VERSION | sed -E 's/.[0-9]+$//')" >> $GITHUB_ENV
141143

142144
- name: Set up dotnet
143-
uses: actions/setup-dotnet@v3.0.3
145+
uses: actions/setup-dotnet@v3.2.0
144146
with:
145147
dotnet-version: 6.0.201
146148

@@ -172,6 +174,7 @@ jobs:
172174
name: Sign and notarize macOS package
173175
# ESRP service requires signing to run on Windows
174176
runs-on: windows-latest
177+
environment: release
175178
strategy:
176179
matrix:
177180
runtime: [ osx-x64, osx-arm64 ]
@@ -242,11 +245,12 @@ jobs:
242245
win-sign:
243246
name: Build and Sign Windows
244247
runs-on: windows-latest
248+
environment: release
245249
steps:
246250
- uses: actions/checkout@v3
247251

248252
- name: Set up dotnet
249-
uses: actions/setup-dotnet@v3.0.3
253+
uses: actions/setup-dotnet@v3.2.0
250254
with:
251255
dotnet-version: 6.0.201
252256

@@ -347,7 +351,7 @@ jobs:
347351
- uses: actions/checkout@v3
348352

349353
- name: Setup .NET
350-
uses: actions/setup-dotnet@v3.0.3
354+
uses: actions/setup-dotnet@v3.2.0
351355
with:
352356
dotnet-version: 6.0.201
353357

@@ -375,6 +379,7 @@ jobs:
375379
needs: linux-build
376380
# ESRP service requires signing to run on Windows
377381
runs-on: windows-latest
382+
environment: release
378383
steps:
379384
- uses: actions/checkout@v3
380385

@@ -433,7 +438,7 @@ jobs:
433438
- uses: actions/checkout@v3
434439

435440
- name: Setup .NET
436-
uses: actions/setup-dotnet@v3.0.3
441+
uses: actions/setup-dotnet@v3.2.0
437442
with:
438443
dotnet-version: 6.0.201
439444

@@ -452,6 +457,7 @@ jobs:
452457
name: Sign .NET tool payload
453458
# ESRP service requires signing to run on Windows
454459
runs-on: windows-latest
460+
environment: release
455461
needs: dotnet-tool-build
456462
steps:
457463
- uses: actions/checkout@v3
@@ -525,7 +531,7 @@ jobs:
525531
path: signed
526532

527533
- name: Setup .NET
528-
uses: actions/setup-dotnet@v3.0.3
534+
uses: actions/setup-dotnet@v3.2.0
529535
with:
530536
dotnet-version: 6.0.201
531537

@@ -545,6 +551,7 @@ jobs:
545551
name: Sign .NET tool package
546552
# ESRP service requires signing to run on Windows
547553
runs-on: windows-latest
554+
environment: release
548555
needs: dotnet-tool-pack
549556
steps:
550557
- uses: actions/checkout@v3
@@ -690,6 +697,7 @@ jobs:
690697
create-github-release:
691698
name: Publish GitHub draft release
692699
runs-on: ubuntu-latest
700+
environment: release
693701
needs: [ validate ]
694702
steps:
695703
- uses: actions/checkout@v3
@@ -700,7 +708,7 @@ jobs:
700708
echo "VERSION=$(cat VERSION | sed -E 's/.[0-9]+$//')" >> $GITHUB_ENV
701709
702710
- name: Set up dotnet
703-
uses: actions/setup-dotnet@v3.0.3
711+
uses: actions/setup-dotnet@v3.2.0
704712
with:
705713
dotnet-version: 6.0.201
706714

@@ -783,8 +791,3 @@ jobs:
783791
// Upload .NET tool package
784792
uploadDirectoryToRelease('dotnet-tool-sign'),
785793
]);
786-
787-
- name: Publish .NET tool to nuget.org
788-
run: |
789-
dotnet nuget push dotnet-tool-sign/*.nupkg \
790-
--api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

.github/workflows/validate-install-from-source.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: validate-install-from-source
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- main
@@ -14,7 +15,7 @@ jobs:
1415
matrix:
1516
vector:
1617
- image: ubuntu
17-
- image: debian
18+
- image: debian:bullseye
1819
- image: fedora
1920
# Centos no longer officially maintains images on Docker Hub. However,
2021
# tgagor is a contributor who pushes updated images weekly, which should
@@ -26,7 +27,6 @@ jobs:
2627
- image: opensuse/leap
2728
- image: opensuse/tumbleweed
2829
- image: registry.suse.com/suse/sle15:15.4.27.11.31
29-
- image: archlinux
3030
container: ${{matrix.vector.image}}
3131
steps:
3232
- run: |

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net6.0/git-credential-manager.dll",
13+
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net7.0/git-credential-manager.dll",
1414
"args": ["get"],
1515
"cwd": "${workspaceFolder}/out/shared/Git-Credential-Manager",
1616
"console": "integratedTerminal",
@@ -22,7 +22,7 @@
2222
"request": "launch",
2323
"preLaunchTask": "build",
2424
// If you have changed target frameworks, make sure to update the program path.
25-
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net6.0/git-credential-manager.dll",
25+
"program": "${workspaceFolder}/out/shared/Git-Credential-Manager/bin/Debug/net7.0/git-credential-manager.dll",
2626
"args": ["store"],
2727
"cwd": "${workspaceFolder}/out/shared/Git-Credential-Manager",
2828
"console": "integratedTerminal",

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"type": "shell",
5757
"group": "test",
5858
"args": [
59-
"~/.nuget/packages/reportgenerator/*/*/net6.0/ReportGenerator.dll",
59+
"~/.nuget/packages/reportgenerator/*/*/net7.0/ReportGenerator.dll",
6060
"-reports:${workspaceFolder}/**/TestResults/**/coverage.cobertura.xml",
6161
"-targetdir:${workspaceFolder}/out/code-coverage"
6262
],
@@ -71,7 +71,7 @@
7171
"type": "shell",
7272
"group": "test",
7373
"args": [
74-
"${env:USERROFILE}/.nuget/packages/reportgenerator/*/*/net6.0/ReportGenerator.dll",
74+
"${env:USERROFILE}/.nuget/packages/reportgenerator/*/*/net7.0/ReportGenerator.dll",
7575
"-reports:${workspaceFolder}/**/TestResults/**/coverage.cobertura.xml",
7676
"-targetdir:${workspaceFolder}/out/code-coverage"
7777
],

0 commit comments

Comments
 (0)