Skip to content

Commit

Permalink
Topic/fix choco winget (#2186)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHinsh authored Jul 17, 2024
2 parents 0e1ddc7 + 58c2e78 commit 47d9526
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ env.APP_ID }}
private-key: ${{ env.PRIVATE_KEY }}
app-id: ${{ secrets.NKDAGILITY_BOT_APP_ID }}
private-key: ${{ secrets.NKDAGILITY_BOT_CLIENTSECRET }}
- uses: fitomad/github-chatgpt-integration@main
with:
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ permissions:
on:
push:
branches:
- "*"
tags:
- '!v*-*'
pull_request:
Expand All @@ -19,10 +18,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
APP_ID: "Iv23li9aYvt0VW9x4Jhh"
PRIVATE_KEY: ${{ secrets.NKDAGILITY_BOT_CLIENTSECRET }}

defaults:
run:
shell: pwsh
Expand Down Expand Up @@ -253,6 +248,9 @@ jobs:
GitVersion_InformationalVersion: ${{ needs.Setup.outputs.GitVersion_InformationalVersion }}
GitVersion_NuGetVersion: ${{ needs.Setup.outputs.GitVersion_NuGetVersion }}
GitVersion_PreReleaseLabel: ${{ needs.Setup.outputs.GitVersion_PreReleaseLabel }}
HasChanged_src: ${{ needs.Setup.outputs.HasChanged_src }}
HasChanged_docs: ${{ needs.Setup.outputs.HasChanged_docs }}
HasChanged_automation: ${{ needs.Setup.outputs.HasChanged_automation }}
needs: [build, Setup]
if: ${{ success() && ( needs.Setup.outputs.nkdAgility_Ring != 'Canary' ) }}
steps:
Expand All @@ -262,8 +260,8 @@ jobs:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ env.APP_ID }}
private-key: ${{ env.PRIVATE_KEY }}
app-id: ${{ secrets.NKDAGILITY_BOT_APP_ID }}
private-key: ${{ secrets.NKDAGILITY_BOT_CLIENTSECRET }}
- name: "Package Files"
shell: pwsh
run: |
Expand All @@ -272,7 +270,7 @@ jobs:
id: release-options
shell: pwsh
run: |
if ($Env:nkdAgility_Ring -ne 'Canary') {
if ($Env:nkdAgility_Ring -ne 'Canary' && ($Env:HasChanged_src || $Env:HasChanged_docs )) {
echo "discussion_category_name=Anouncement" >> $env:GITHUB_OUTPUT
}
- name: Release
Expand Down Expand Up @@ -357,7 +355,7 @@ jobs:
Write-Output $"Running with {$chocoFile}"
}
choco push $chocoFile.FullName --version $NuGetVersion --key ${{ secrets.CHOCO_APIKEY }} --source https://push.chocolatey.org/
choco push "$chocoFile" --version $NuGetVersion --key ${{ secrets.CHOCO_APIKEY }} --source https://push.chocolatey.org/
# Release to Winget
Expand All @@ -379,7 +377,7 @@ jobs:
- name: "Winget Release"
shell: pwsh
run: |
.\build\releaseWingetPackage.ps1 -version ${{ needs.Setup.outputs.GitVersion_SemVer }} -ring ${{needs.Setup.outputs.nkdAgility_Ring}} -GH_TOKEN ${{ secrets.GITHUB_TOKEN }}
.\build\releaseWingetPackage.ps1 -version ${{ needs.Setup.outputs.GitVersion_SemVer }} -ring ${{needs.Setup.outputs.nkdAgility_Ring}} -GH_TOKEN ${{ secrets.NKD_MRHINSH_TOKEN }}
# Release to Docs
DocsRelease:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/open-pr-describer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: OpenAI PR Description Generator

on:
pull_request:
types:
- opened
- synchronize

permissions:
pull-requests: write
contents: read

jobs:
pull-request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Ant0wan/openai-pr@v1
with:
api-key: ${{ secrets.OPENAI_API_KEY }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions MigrationTools.sln
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".workflows", ".workflows",
ProjectSection(SolutionItems) = preProject
.github\workflows\code-review.yml = .github\workflows\code-review.yml
.github\workflows\main.yml = .github\workflows\main.yml
.github\workflows\open-pr-describer.yml = .github\workflows\open-pr-describer.yml
.github\workflows\opencommit.yml = .github\workflows\opencommit.yml
.github\workflows\stale.yml = .github\workflows\stale.yml
EndProjectSection
Expand Down

0 comments on commit 47d9526

Please sign in to comment.