Skip to content

Commit fdcc261

Browse files
committed
Implement main TUI runner and packing
1 parent 1f00f12 commit fdcc261

12 files changed

Lines changed: 113 additions & 270 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 0 additions & 108 deletions
This file was deleted.

‎.github/workflows/publish.yml‎

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@
44

55
name: publish
66
on:
7+
push:
8+
branches: [ main ]
9+
paths-ignore:
10+
- changelog.md
11+
- readme.md
12+
pull_request:
13+
types: [opened, synchronize, reopened]
714
release:
815
types: [prereleased, released]
9-
16+
1017
env:
1118
DOTNET_NOLOGO: true
1219
Configuration: Release
@@ -31,23 +38,15 @@ jobs:
3138
uses: devlooped/actions-dotnet-env@v1
3239

3340
- name: 🙏 build
34-
run: dotnet build -m:1 -bl:build.binlog
35-
36-
- name: 🧪 test
37-
shell: pwsh
38-
run: dnx --yes retest -- --no-build
39-
40-
- name: 🐛 logs
41-
uses: actions/upload-artifact@v4
42-
if: runner.debug && always()
43-
with:
44-
name: logs
45-
path: '*.binlog'
41+
run: |
42+
dotnet pack -c Release
43+
dotnet pack -c Release -r win-x64
44+
dotnet pack -c Release -r win-arm64
4645
4746
- name: 🚀 nuget
4847
env:
4948
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
50-
if: ${{ env.NUGET_API_KEY != '' && github.event.action != 'prereleased' }}
49+
if: ${{ env.NUGET_API_KEY != '' && github.event.action == 'released' }}
5150
working-directory: bin
5251
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
5352

‎.github/workflows/triage.yml‎

Lines changed: 0 additions & 107 deletions
This file was deleted.

‎.netconfig‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@
5757
weak
5858
[file ".github/workflows/build.yml"]
5959
url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml
60-
sha = 5da103cfbc1c4f9b5f59cfa698d2afbd744a7525
61-
etag = 851af098748f7cfa5bc3cfd4cc404a6de930532b59ceb2b3b535282c41226f3a
62-
weak
60+
skip
6361
[file ".github/workflows/changelog.config"]
6462
url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.config
6563
sha = 08d83cb510732f861416760d37702f9f55bd7f9e
@@ -87,14 +85,10 @@
8785
weak
8886
[file ".github/workflows/publish.yml"]
8987
url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml
90-
sha = 7f5f9ee9f362f7e8f951d618f8f799033550e687
91-
etag = c60411d1aa4e98e7f69e2d34cbccb8eb7e387ec11f6f8e78ee8d8b92122d7025
92-
weak
88+
skip
9389
[file ".github/workflows/triage.yml"]
9490
url = https://github.com/devlooped/oss/blob/main/.github/workflows/triage.yml
95-
sha = 61a602fc61eedbdae235f01e93657a6219ac2427
96-
etag = 152cd3a559c08da14d1da12a5262ba1d2e0ed6bed6d2eabf5bd209b0c35d8a75
97-
weak
91+
skip
9892
[file ".gitignore"]
9993
url = https://github.com/devlooped/oss/blob/main/.gitignore
10094
sha = c76f0cc3e225e39e79420587d94852e12cdcb32a

‎AGENTS.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Agent Notes
2+
3+
## Packaging
4+
5+
- `winget-tui` version is pinned in `winget-tui.version` at the repo root; update it there when refreshing the upstream payload.
6+
- Only Windows x64 (`win-x64`) and Windows ARM64 (`win-arm64`) are supported.
7+
- The `PrepareTui` MSBuild target in `src/winget/winget.csproj` downloads the binaries automatically during `Build` or `Pack`. No manual restore step is needed.
8+
- Binaries are cached at `src/winget/obj/winget-tui/<version>/<rid>/winget-tui.exe`. Embedding the version in the path means a version bump automatically triggers a fresh download.
9+
- Batching over `TuiRid` items downloads both RIDs incrementally; MSBuild skips a RID if its versioned output already exists.
10+
11+
## Runtime
12+
13+
- The main app resolves `winget-tui.exe` from the bundled payload next to the app output; there is no PATH fallback.

‎readme.md‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,17 @@
55
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/devlooped/oss/blob/main/license.txt)
66

77
<!-- #content -->
8+
A terminal UI for Windows Package Manager (winget) - search, install, upgrade, and manage packages.
9+
10+
![tui](https://raw.githubusercontent.com/shanselman/winget-tui/main/img/wingettui.png)
11+
812
## Usage
9-
*winget*
13+
> dnx winget --yes
1014
<!-- #content -->
1115
---
12-
<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->
16+
<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->
17+
18+
> [!IMPORTANT]
19+
> This project is simply a dnx-distributable wrapper around the original
20+
> [winget-tui](https://github.com/shanselman/winget-tui) project by Scott Hanselman.
21+
> Please refer to the original repository for issues, contributions, and updates.

‎src/Tests/Tests.csproj‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎src/winget/Program.cs‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System.Diagnostics;
2+
3+
var exe = Path.Combine(
4+
Path.GetDirectoryName(AppContext.BaseDirectory)!,
5+
"winget-tui", "winget-tui.exe");
6+
7+
if (!File.Exists(exe))
8+
{
9+
Console.Error.WriteLine($"winget-tui.exe not found at: {exe}");
10+
return 1;
11+
}
12+
13+
var psi = new ProcessStartInfo(exe) { UseShellExecute = false };
14+
foreach (var arg in args)
15+
psi.ArgumentList.Add(arg);
16+
17+
var process = Process.Start(psi) ?? throw new InvalidOperationException("Failed to start winget-tui.exe");
18+
19+
process.WaitForExit();
20+
return process.ExitCode;

‎src/winget/readme.md‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@
22
[![GitHub](https://img.shields.io/badge/-source-181717.svg?logo=GitHub)](https://github.com/devlooped/winget)
33

44
<!-- include ../../readme.md#content -->
5-
6-
<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->
7-
8-
<!-- exclude -->
5+
<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->

0 commit comments

Comments
 (0)