Skip to content

Commit

Permalink
Packing choco separately
Browse files Browse the repository at this point in the history
  • Loading branch information
bc3tech committed Jul 13, 2024
1 parent 8d482e9 commit ccf8a7c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/build-and-pack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
APP_VERSION: "0.2.${{ github.run_number }}"

jobs:
build-and-package:
build:
runs-on: windows-latest
steps:
- name: debug
Expand All @@ -32,6 +32,17 @@ jobs:
with:
name: binaries
path: bin\Release\net8.0\win-x64\publish\**
choco-pack:
needs: build
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: binaries
path: bin

- name: Package
run: cd choco && choco pack --version ${{ env.APP_VERSION }}
Expand All @@ -43,7 +54,7 @@ jobs:
path: choco/*.nupkg
publish-choco:
if: github.ref == 'refs/heads/main'
needs: build-and-package
needs: choco-pack
runs-on: windows-latest
steps:
- name: Download a single artifact
Expand All @@ -62,11 +73,9 @@ jobs:
choco push "$($pkg.FullName)" -s "$env:PUSH_URL" -k "$env:API_KEY"
}
create-release:
needs:
- build-and-package
needs: build
runs-on: ubuntu-latest
steps:
# - uses: actions/checkout@v2
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -88,8 +97,7 @@ jobs:
prerelease: ${{ github.ref != 'refs/heads/main'}}
token: ${{ secrets.GITHUB_TOKEN }}
publish-winget:
needs:
- create-release
needs: create-release
runs-on: ubuntu-latest
steps:
- name: Update Packages
Expand Down
2 changes: 1 addition & 1 deletion choco/filesorter.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ This is a nuspec. It mostly adheres to https://docs.nuget.org/create/Nuspec-Refe
<!-- this section controls what actually gets packaged into the Chocolatey package -->
<file src="createdump.exe.ignore" target="." />
<file src="tools\**" target="tools" />
<file src="..\bin\release\net8.0\win-x64\publish\**" target="." />
<file src="..\bin\**" target="." />
<!--Building from Linux? You may need this instead: <file src="tools/**" target="tools" />-->
</files>
</package>

0 comments on commit ccf8a7c

Please sign in to comment.