Skip to content

Commit

Permalink
feat: Added winget publishing support (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kürzeder authored Sep 14, 2023
1 parent d24b44d commit 9faabe6
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 22 deletions.
70 changes: 57 additions & 13 deletions .goreleaser-windows.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
before:
hooks:
- go mod tidy

builds:
- env:
- CGO_ENABLED=0
Expand All @@ -16,8 +17,10 @@ builds:
- -X go.szostok.io/version.buildDate={{.Date}}
checksum:
name_template: 'windows_checksums.txt'

snapshot:
name_template: "{{ incpatch .Version }}"

changelog:
sort: asc
filters:
Expand All @@ -26,23 +29,64 @@ changelog:
- '^test:'
- '^.github:'
- '^.vscode:'

archives:
- name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
format: zip
chocolateys:

# Re-enable when https://github.com/goreleaser/goreleaser/issues/4292 is fixed
# chocolateys:
# - name: azctx
# dependencies:
# - id: azure-cli
# owners: "Martin Brandl"
# authors: "Martin Brandl"
# url_template: "https://github.com/whiteducksoftware/azctx/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# tags: "azctx azure cli"
# require_license_acceptance: true
# description: "Faster switching between Azure Subscriptions in your Azure CLI."
# api_key: "{{ .Env.CHOCO_API_KEY }}"
# source_repo: "https://push.chocolatey.org/"
# project_url: "https://github.com/whiteducksoftware/azctx"
# license_url: "https://github.com/whiteducksoftware/azctx/blob/main/LICENSE"
# bug_tracker_url: "https://github.com/whiteducksoftware/azctx/issues"
# release_notes: "https://github.com/whiteducksoftware/azctx/releases/tag/{{ .Tag }}"
# copyright: "Copyright 2023 white duck GmbH"

winget:
- name: azctx
dependencies:
- id: azure-cli
owners: "Martin Brandl"
authors: "Martin Brandl"
publisher: "white duck GmbH"
path: "manifests/w/whiteducksoftware/azctx/{{ .Version }}"
short_description: "Faster switching between Azure Subscriptions in your Azure CLI"
license: "mit"
publisher_url: "https://whiteduck.de/en/"
publisher_support_url: "https://whiteduck.de/en/contact/"
package_identifier: whiteduck.azctx
url_template: "https://github.com/whiteducksoftware/azctx/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
tags: "azctx azure cli"
require_license_acceptance: true
description: "Faster switching between Azure Subscriptions in your Azure CLI."
api_key: "{{ .Env.CHOCO_API_KEY }}"
source_repo: "https://push.chocolatey.org/"
project_url: "https://github.com/whiteducksoftware/azctx"
commit_author:
name: Stefan Kürzeder
email: [email protected]
commit_msg_template: "WinGet manifest update for {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://github.com/whiteducksoftware/azctx"
license_url: "https://github.com/whiteducksoftware/azctx/blob/main/LICENSE"
bug_tracker_url: "https://github.com/whiteducksoftware/azctx/issues"
release_notes: "https://github.com/whiteducksoftware/azctx/releases/tag/{{ .Tag }}"
copyright: "Copyright 2023 white duck GmbH"
# If set to auto, the release will not be uploaded to the repository
# in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1
skip_upload: auto
release_notes: "{{.Changelog}}"
release_notes_url: "https://github.com/whiteducksoftware/azctx/releases/tag/{{ .Tag }}"
tags:
- azure
- azure-cli
repository:
owner: whiteducksoftware
name: winget-pkgs
branch: master
token: "{{ .Env.AUTH_GITHUB }}"
pull_request:
enabled: true
draft: true
base:
owner: whiteducksoftware
name: winget-pkgs
branch: master
11 changes: 7 additions & 4 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
before:
hooks:
- go mod tidy

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm
Expand All @@ -17,8 +17,10 @@ builds:
- -X go.szostok.io/version.buildDate={{.Date}}
checksum:
name_template: 'linux_darwin_checksums.txt'

snapshot:
name_template: "{{ incpatch .Version }}"

changelog:
sort: asc
filters:
Expand All @@ -27,9 +29,11 @@ changelog:
- '^test:'
- '^.github:'
- '^.vscode:'

archives:
- name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
format: zip

brews:
- name: azctx
repository:
Expand All @@ -46,8 +50,7 @@ brews:
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
folder: Formula
homepage: "https://github.com/whiteducksoftware/azctx"
description: "Faster switching between Azure Subscriptions in your Azure CLI."
description: "Faster switching between Azure Subscriptions in your Azure CLI"
license: "MIT"
install: |
bin.install "azctx"
5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

0 comments on commit 9faabe6

Please sign in to comment.