Skip to content

Commit

Permalink
ci: fix only getting the second last tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Meerownymous committed Dec 16, 2024
1 parent dd4186f commit 5904ee0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Get Current Tag
shell: bash
run: |
CURRENT_TAG=$(git describe --tags --abbrev=0)
CURRENT_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "CURRENT_TAG=$CURRENT_TAG" >> $GITHUB_ENV
- name: Debug Current Tag
Expand Down
25 changes: 17 additions & 8 deletions Build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,23 @@ public override void Run(BuildContext context)
var nugets = context.GetFiles($"{Settings.ArtifactPath}/*.nupkg");
foreach (var package in nugets)
{
context.NuGetPush(
package,
new NuGetPushSettings
{
Source = Settings.NugetSource,
ApiKey = Settings.NugetReleaseToken
}
);
try
{
context.NuGetPush(
package,
new NuGetPushSettings
{
Source = Settings.NugetSource,
ApiKey = Settings.NugetReleaseToken
}
);
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}

}
var symbols = context.GetFiles($"{Settings.ArtifactPath}/*.snupkg");
foreach (var symbol in symbols)
Expand Down

0 comments on commit 5904ee0

Please sign in to comment.