Skip to content

Commit

Permalink
Generate winget manifests (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbialon authored Aug 4, 2023
1 parent d4f681a commit 71f130d
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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 }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
WINGET_GITHUB_TOKEN: ${{ steps.winget_token.outputs.token }}
14 changes: 14 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.

0 comments on commit 71f130d

Please sign in to comment.