diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7fce099c28..5d07c633ac 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -115,8 +115,20 @@ jobs: with: distribution: goreleaser version: latest - args: release --clean --debug + args: release --debug env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }} + + # https://github.com/goreleaser/goreleaser/blob/2a3009757a8996cdcf2a77deb0e5fa413d1f2660/internal/pipe/chocolatey/chocolatey.go#L158 + - name: Inspect generated artifacts + run: | + ls -laR dist/ + cat dist/pacaptr.choco/pacaptr.nuspec + + # https://github.com/goreleaser/goreleaser/blob/2a3009757a8996cdcf2a77deb0e5fa413d1f2660/internal/pipe/chocolatey/chocolatey.go#L201-L208 + # https://stackoverflow.com/a/75835172 + - name: Publish app on Chocolatey + run: | + choco push dist/*.nupkg --source https://push.chocolatey.org --api-key ${{ secrets.CHOCO_API_KEY }} --verbose ${{ contains(github.ref, '-') && '--noop' || '' }} diff --git a/.goreleaser.yml b/.goreleaser.yml index ff357881ea..9c610d6783 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -62,9 +62,7 @@ brews: test: | system "#{bin}/pacaptr --help" - # TODO: Remove this when moving out of testing. - # skip_upload: auto - skip_upload: false + skip_upload: auto # https://github.com/goreleaser/goreleaser/blob/a0f0d01a8143913cde72ebc1248abef089ae9b27/.goreleaser.yaml#L211 repository: @@ -80,7 +78,8 @@ brews: branch: master chocolateys: - - package_source_url: https://github.com/rami3l/pacaptr + - name: pacaptr + package_source_url: https://github.com/rami3l/pacaptr owners: Rami3L # == SOFTWARE SPECIFIC SECTION == @@ -94,6 +93,7 @@ chocolateys: bug_tracker_url: https://github.com/rami3l/pacaptr/issues tags: pacaptr pacman summary: Pacman-like syntax wrapper for many package managers. + release_notes: "https://github.com/rami3l/pacaptr/releases/tag/v{{ .Version }}" description: | # pacaptr @@ -102,23 +102,7 @@ chocolateys: Run `pacaptr -Syu` on the OS of your choice! # == PUBLISH SPECIFIC SECTION == + source_repo: "https://push.chocolatey.org/" api_key: "{{ .Env.CHOCO_API_KEY }}" - # TODO: Publish the nupkg release if not prerelease. - # println!(":: Setting choco API key..."); - # let choco_api_key = env::var("CHOCO_API_KEY")?; - # cmd!( - # s, - # "choco apikey --key {choco_api_key} --source https://push.chocolatey.org --verbose" - # ) - # .run()?; - - # println!(":: Packing up NuGet package..."); - # cmd!(s, "choco pack {nuspec_path} --verbose").run()?; - - # println!(":: Pushing to choco repository..."); - # cmd!( - # s, - # "choco push pacaptr.{ver}.nupkg --source https://push.chocolatey.org --verbose" - # ) - # .run()?; + # Publishing is handled in `.github\workflows\publish.yml`. skip_publish: true diff --git a/assets/logo.png b/assets/logo.png new file mode 100644 index 0000000000..fce3787e7c Binary files /dev/null and b/assets/logo.png differ