diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ed3fde9..3dd8512 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,13 @@ jobs: packages: write steps: + - name: Generate winget token + id: winget_token + uses: tibdex/github-app-token@v1 + with: + app_id: ${{ secrets.WINGET_APP_ID }} + private_key: ${{ secrets.WINGET_APP_PRIVATE_KEY }} + - name: Checkout uses: actions/checkout@v3 with: { fetch-depth: 0 } @@ -55,4 +62,5 @@ jobs: env: GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} \ No newline at end of file + HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} + WINGET_GITHUB_TOKEN: ${{ steps.winget_token.outputs.token }} diff --git a/.goreleaser.yml b/.goreleaser.yml index de4e295..706a9e6 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -88,3 +88,17 @@ brews: homepage: https://github.com/spacelift-io/spacectl description: "Spacelift client and CLI" license: "MIT" + +winget: + - name: "{{ .ProjectName }}" + publisher: spacelift-io + license: "MIT" + homepage: https://github.com/spacelift-io/spacectl + short_description: "Spacelift client and CLI" + repository: + owner: spacelift-io + name: winget-pkgs + branch: "spacectl-{{.Version}}" + token: "{{ .Env.WINGET_GITHUB_TOKEN }}" + pull_request: + enabled: false diff --git a/README.md b/README.md index fe49f3e..b269d1c 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,27 @@ brew install spacelift-io/spacelift/spacectl ### Arch linux Install [`spacectl-bin`](https://aur.archlinux.org/packages/spacectl-bin) from the Arch User Repository ([AUR](https://aur.archlinux.org/)): + ```bash yay -S spacectl-bin ``` Disclaimer: The package is community-maintained, please make sure to verify the [`PKGBUILD`](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=spacectl-bin) before installing/updating. +### Windows + +You can install `spacectl` using winget: + +```shell +winget install spacectl +``` + +or + +```shell +winget install --id spacelift-io.spacectl +``` + ### asdf ```bash @@ -229,3 +244,5 @@ git push origin v0.24.2 ``` After the tag is pushed, the [release](.github/workflows/release.yml) workflow will trigger and will automatically publish a new GitHub release. + +Once the [release](.github/workflows/release.yml) workflow is done, go to the [winget-pkgs](https://github.com/microsoft/winget-pkgs) repository and submit a pull request for the release version.