-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to the latest nuke packages (#1955)
- Loading branch information
1 parent
4789f92
commit f199a37
Showing
10 changed files
with
334 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,98 @@ | ||
# ------------------------------------------------------------------------------ | ||
# <auto-generated> | ||
# | ||
# This code was generated. | ||
# | ||
# - To turn off auto-generation set: | ||
# | ||
# [CloseMilestoneJob (AutoGenerate = false)] | ||
# | ||
# - To trigger manual generation invoke: | ||
# | ||
# nuke --generate-configuration GitHubActions_close-milestone --host GitHubActions | ||
# | ||
# </auto-generated> | ||
# ------------------------------------------------------------------------------ | ||
|
||
name: Close Milestone | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
RSG_BOT_TOKEN: | ||
required: true | ||
release: | ||
types: | ||
- released | ||
permissions: | ||
actions: read | ||
checks: read | ||
contents: read | ||
deployments: read | ||
id-token: none | ||
issues: write | ||
discussions: none | ||
packages: none | ||
pages: none | ||
pull-requests: write | ||
repository-projects: none | ||
security-events: none | ||
statuses: write | ||
|
||
jobs: | ||
close_milestone: | ||
uses: RocketSurgeonsGuild/actions/.github/workflows/close-milestone6.yml@v0.3.15 | ||
secrets: | ||
RSG_BOT_TOKEN: ${{ secrets.RSG_BOT_TOKEN }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
clean: 'false' | ||
fetch-depth: '0' | ||
- name: Fetch all history for all tags and branches | ||
run: | | ||
git fetch --prune | ||
- name: 📲 Install DotNet | ||
uses: actions/setup-dotnet@v4 | ||
- name: ⚒️ dotnet tool restore | ||
run: | | ||
dotnet tool restore | ||
- name: 🔨 Use GitVersion | ||
id: gitversion | ||
shell: pwsh | ||
run: | | ||
$data = dotnet gitversion | ConvertFrom-Json | ||
foreach ($item in $data.PSObject.Properties) { | ||
$key = $item.Name | ||
$value = $item.Value | ||
echo "$($key.Substring(0,1).ToLower() + $key.Substring(1))=$value" >> $env:GITHUB_OUTPUT | ||
} | ||
- name: Create Milestone | ||
env: | ||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
uses: WyriHaximus/github-action-create-milestone@v1 | ||
with: | ||
title: 'v${{ steps.gitversion.outputs.majorMinorPatch }}' | ||
- name: sync milestones | ||
uses: RocketSurgeonsGuild/actions/sync-milestone@v0.3.15 | ||
with: | ||
default-label: ':sparkles: mysterious' | ||
github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
- name: 📲 Install GitReleaseManager | ||
uses: gittools/actions/gitreleasemanager/setup@v3.1.1 | ||
with: | ||
versionSpec: '0.18.0' | ||
- name: Get Repo and Owner | ||
id: repository | ||
if: ${{ !github.event.release.prerelease && steps.gitversion.outputs.preReleaseTag == '' }} | ||
shell: pwsh | ||
run: | | ||
$parts = $ENV:GITHUB_REPOSITORY.Split('/') | ||
echo "::set-output name=owner::$($parts[0])" | ||
echo "::set-output name=repository::$($parts[1])" | ||
- name: Close Milestone | ||
if: ${{ !github.event.release.prerelease && steps.gitversion.outputs.preReleaseTag == '' }} | ||
shell: pwsh | ||
run: | | ||
dotnet gitreleasemanager close ` | ||
-o "${{ steps.repository.outputs.owner }}" ` | ||
-r "${{ steps.repository.outputs.repository }}" ` | ||
--token "${{ secrets.GITHUB_TOKEN }}" ` | ||
-m "v${{ steps.gitversion.outputs.majorMinorPatch }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,97 @@ | ||
name: Create Milestone and Draft Release | ||
# ------------------------------------------------------------------------------ | ||
# <auto-generated> | ||
# | ||
# This code was generated. | ||
# | ||
# - To turn off auto-generation set: | ||
# | ||
# [DraftReleaseJob (AutoGenerate = false)] | ||
# | ||
# - To trigger manual generation invoke: | ||
# | ||
# nuke --generate-configuration GitHubActions_draft-release --host GitHubActions | ||
# | ||
# </auto-generated> | ||
# ------------------------------------------------------------------------------ | ||
|
||
name: Draft Release and Create Milestone | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
RSG_BOT_TOKEN: | ||
required: true | ||
push: | ||
branches: | ||
- master | ||
- 'master' | ||
paths-ignore: | ||
- '**/*.md' | ||
schedule: | ||
- cron: '0 0 * * 4' | ||
permissions: | ||
actions: read | ||
checks: read | ||
contents: read | ||
deployments: read | ||
id-token: none | ||
issues: write | ||
discussions: none | ||
packages: none | ||
pages: none | ||
pull-requests: write | ||
repository-projects: none | ||
security-events: none | ||
statuses: write | ||
|
||
jobs: | ||
create_milestone_and_draft_release: | ||
uses: RocketSurgeonsGuild/actions/.github/workflows/draft-release6.yml@v0.3.15 | ||
secrets: | ||
RSG_BOT_TOKEN: ${{ secrets.RSG_BOT_TOKEN }} | ||
draft_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
clean: 'false' | ||
fetch-depth: '0' | ||
- name: Fetch all history for all tags and branches | ||
run: | | ||
git fetch --prune | ||
- name: 📲 Install DotNet | ||
uses: actions/setup-dotnet@v4 | ||
- name: ⚒️ dotnet tool restore | ||
run: | | ||
dotnet tool restore | ||
- name: 🔨 Use GitVersion | ||
id: gitversion | ||
shell: pwsh | ||
run: | | ||
$data = dotnet gitversion | ConvertFrom-Json | ||
foreach ($item in $data.PSObject.Properties) { | ||
$key = $item.Name | ||
$value = $item.Value | ||
echo "$($key.Substring(0,1).ToLower() + $key.Substring(1))=$value" >> $env:GITHUB_OUTPUT | ||
} | ||
- name: Create Milestone | ||
env: | ||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
uses: WyriHaximus/github-action-create-milestone@v1 | ||
with: | ||
title: 'v${{ steps.gitversion.outputs.majorMinorPatch }}' | ||
- name: sync milestones | ||
uses: RocketSurgeonsGuild/actions/sync-milestone@v0.3.15 | ||
with: | ||
default-label: ':sparkles: mysterious' | ||
github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
allowUpdates: 'true' | ||
generateReleaseNotes: 'true' | ||
updateOnlyUnreleased: 'true' | ||
draft: 'true' | ||
omitBodyDuringUpdate: 'true' | ||
omitNameDuringUpdate: 'true' | ||
omitDraftDuringUpdate: 'true' | ||
name: 'v${{ steps.gitversion.outputs.majorMinorPatch }}' | ||
tag: 'v${{ steps.gitversion.outputs.majorMinorPatch }}' | ||
token: '${{ secrets.RSG_BOT_TOKEN }}' | ||
commit: '${{ github.base_ref }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# ------------------------------------------------------------------------------ | ||
# <auto-generated> | ||
# | ||
# This code was generated. | ||
# | ||
# - To turn off auto-generation set: | ||
# | ||
# [PublishNugetPackagesJob (AutoGenerate = false)] | ||
# | ||
# - To trigger manual generation invoke: | ||
# | ||
# nuke --generate-configuration GitHubActions_publish-nuget --host GitHubActions | ||
# | ||
# </auto-generated> | ||
# ------------------------------------------------------------------------------ | ||
|
||
name: Publish Nuget Packages | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- 'ci' | ||
types: | ||
- 'completed' | ||
permissions: | ||
actions: read | ||
checks: read | ||
contents: read | ||
deployments: read | ||
id-token: none | ||
issues: write | ||
discussions: none | ||
packages: none | ||
pages: none | ||
pull-requests: write | ||
repository-projects: none | ||
security-events: none | ||
statuses: write | ||
|
||
jobs: | ||
publish_nuget: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: '${{ toJson(github) }}' | ||
shell: pwsh | ||
run: | | ||
echo "$GITHUB_CONTEXT" | ||
- name: 🚀 NuGet | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: 'nuget' | ||
github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
run-id: '${{ github.event.workflow_run.id }}' | ||
- name: nuget.org | ||
env: | ||
ApiKey: '${{ secrets.RSG_NUGET_API_KEY }}' | ||
if: startsWith(github.event.workflow_run.head_branch, 'v') && contains(github.event.workflow_run.head_branch, '.') && !contains(github.event.workflow_run.head_branch, '/') | ||
shell: pwsh | ||
run: | | ||
dotnet nuget push **/*.nupkg --skip-duplicate -s nuget.org --api-key $ENV:ApiKey | ||
dotnet nuget push **/*.snupkg --skip-duplicate -s nuget.org --api-key $ENV:ApiKey |
Oops, something went wrong.