Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate winget manifests (#163) #169

Merged
merged 1 commit into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.