Skip to content

Commit 9e1e34a

Browse files
committed
Configure SSH key in checkout action instead
1 parent 56e001c commit 9e1e34a

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

.github/workflows/dotnet.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ jobs:
122122
environment: Release
123123
steps:
124124
- uses: actions/checkout@v3
125+
with:
126+
ssh-key: ${{ secrets.SILK_ACTIONS_DEPLOY_KEY }}
125127
- uses: actions/download-artifact@v4
126128
with:
127129
name: unsigned_nupkgs
@@ -137,8 +139,6 @@ jobs:
137139
--akv-tenant ${{ secrets.AKV_TENANT }}
138140
--akv-vault-url ${{ secrets.AKV_VAULT_URL }}
139141
--discord-webhook ${{ secrets.DISCORD_ANNOUNCEMENT_WEBHOOK }}
140-
env:
141-
SILK_ACTIONS_DEPLOY_KEY: ${{ secrets.SILK_ACTIONS_DEPLOY_KEY }}
142142
- name: Upload Signed Artifacts to Actions
143143
uses: actions/upload-artifact@v4
144144
with:

eng/build/Build.Publishing.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,17 +197,8 @@ private async Task CreateReleaseAsync(string version, string versionSuffix, stri
197197
{
198198
var tag =
199199
$"v{version}{(string.IsNullOrWhiteSpace(versionSuffix) ? string.Empty : $"-{versionSuffix}")}";
200-
if (Environment.GetEnvironmentVariable("SILK_ACTIONS_DEPLOY_KEY") is { } deployKey)
201-
{
202-
await File.WriteAllTextAsync(TemporaryDirectory / "deploy_key.pem", deployKey);
203-
Git(
204-
$"config core.sshCommand \"ssh -i \\\"{TemporaryDirectory / "deploy_key.pem"}\\\"\""
205-
);
206-
}
207-
208200
Git($"config user.email \"[email protected]\"");
209201
Git($"config user.name \"The Silk.NET Automaton\"");
210-
Git("remote set-url origin [email protected]:dotnet/Silk.NET.git");
211202
Git($"tag {tag}");
212203
Git($"push origin {tag}");
213204
return; // TODO while testing release flow

0 commit comments

Comments
 (0)