From 10674dd38e7b7aab8583b4badb094edfceb0f669 Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Mon, 10 Nov 2025 17:30:46 -0800 Subject: [PATCH 01/20] templates and build step for validating/submitting winget package --- .github/workflows/rust-release.yml | 25 ++++++- .github/workflows/winget-submit.yml | 66 +++++++++++++++++++ codex-rs/cli/packaging/winget/README.md | 39 +++++++++++ .../template/OpenAI.Codex.installer.yaml | 17 +++++ .../template/OpenAI.Codex.locale.en-US.yaml | 20 ++++++ .../winget/template/OpenAI.Codex.yaml | 6 ++ 6 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/winget-submit.yml create mode 100644 codex-rs/cli/packaging/winget/README.md create mode 100644 codex-rs/cli/packaging/winget/template/OpenAI.Codex.installer.yaml create mode 100644 codex-rs/cli/packaging/winget/template/OpenAI.Codex.locale.en-US.yaml create mode 100644 codex-rs/cli/packaging/winget/template/OpenAI.Codex.yaml diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 6f27fbf543..298d02d247 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -383,6 +383,8 @@ jobs: tag: ${{ github.ref_name }} should_publish_npm: ${{ steps.npm_publish_settings.outputs.should_publish }} npm_tag: ${{ steps.npm_publish_settings.outputs.npm_tag }} + x64_sha256: ${{ steps.win_hash.outputs.x64_sha256 }} + arm64_sha256: ${{ steps.win_hash.outputs.arm64_sha256 }} steps: - name: Checkout repository @@ -395,6 +397,16 @@ jobs: - name: List run: ls -R dist/ + - name: Compute SHA256 for Windows EXEs + id: win_hash + shell: bash + run: | + set -euo pipefail + x64_sha=$(sha256sum "dist/x86_64-pc-windows-msvc/codex-x86_64-pc-windows-msvc.exe" | awk '{print $1}') + arm_sha=$(sha256sum "dist/aarch64-pc-windows-msvc/codex-aarch64-pc-windows-msvc.exe" | awk '{print $1}') + echo "x64_sha256=${x64_sha}" >> "$GITHUB_OUTPUT" + echo "arm64_sha256=${arm_sha}" >> "$GITHUB_OUTPUT" + - name: Define release name id: release_name run: | @@ -549,4 +561,15 @@ jobs: repos/${GITHUB_REPOSITORY}/git/refs/heads/latest-alpha-cli \ -X PATCH \ -f sha="${GITHUB_SHA}" \ - -F force=true + -F force=true + + winget: + needs: release + uses: ./.github/workflows/winget-submit.yml + with: + version: ${{ needs.release.outputs.version }} + x64_sha256: ${{ needs.release.outputs.x64_sha256 }} + arm64_sha256: ${{ needs.release.outputs.arm64_sha256 }} + secrets: + WINGET_PUBLISH_PAT: ${{ secrets.WINGET_PUBLISH_PAT }} + continue-on-error: true diff --git a/.github/workflows/winget-submit.yml b/.github/workflows/winget-submit.yml new file mode 100644 index 0000000000..72ee2ef46c --- /dev/null +++ b/.github/workflows/winget-submit.yml @@ -0,0 +1,66 @@ +name: Winget Submit (Reusable) + +on: + workflow_call: + inputs: + version: + description: "Release version (e.g., 0.57.0)" + required: true + type: string + x64_sha256: + description: "Precomputed SHA256 for x64 EXE" + required: true + type: string + arm64_sha256: + description: "Precomputed SHA256 for arm64 EXE" + required: true + type: string + # secrets: + # WINGET_PUBLISH_PAT: + # required: true + +jobs: + submit-winget: + runs-on: windows-latest + permissions: + contents: read + env: + REPO: ${{ github.repository }} + VERSION: ${{ inputs.version }} + X64_SHA: ${{ inputs.x64_sha256 }} + ARM_SHA: ${{ inputs.arm64_sha256 }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + # Assumes inputs.x64_sha256 and inputs.arm64_sha256 are provided + + - name: Build manifest directory + shell: bash + run: | + set -euo pipefail + v="$VERSION" + root="manifests/o/OpenAI/Codex/$v" + tpl="cli/packaging/winget/template" + mkdir -p "$root" + for f in OpenAI.Codex.yaml OpenAI.Codex.locale.en-US.yaml OpenAI.Codex.installer.yaml; do + sed -e "s/{{VERSION}}/$v/g" \ + -e "s/{{X64_SHA256}}/$X64_SHA/g" \ + -e "s/{{ARM64_SHA256}}/$ARM_SHA/g" \ + "$tpl/$f" > "$root/$f" + done + echo "Manifest staged at $root" + + - name: Install WinGet Create + shell: bash + run: winget install --id Microsoft.WingetCreate -e --accept-package-agreements --accept-source-agreements + + - name: Validate manifests + shell: bash + run: wingetcreate validate "manifests/o/OpenAI/Codex/${{ inputs.version }}" + + # - name: Submit PR to winget-pkgs + # env: + # GITHUB_TOKEN: ${{ secrets.WINGET_PUBLISH_PAT }} + # shell: bash + # run: wingetcreate submit "manifests/o/OpenAI/Codex/${{ inputs.version }}" diff --git a/codex-rs/cli/packaging/winget/README.md b/codex-rs/cli/packaging/winget/README.md new file mode 100644 index 0000000000..8858074b1d --- /dev/null +++ b/codex-rs/cli/packaging/winget/README.md @@ -0,0 +1,39 @@ +WinGet manifests for the Codex CLI + +Local testing + +- Validate: `wingetcreate validate .\\cli\\packaging\\winget\\manifests\\o\\OpenAI\\Codex\\0.57.0` +- Install from local manifests: `winget install --manifest .\\cli\\packaging\\winget\\manifests\\o\\OpenAI\\Codex\\0.57.0` +- Verify: `codex --version` and `where codex` +- Uninstall: `winget uninstall OpenAI.Codex` + +Submitting to winget-pkgs + +- Ensure URLs and SHA256 match the public GitHub Release for this version. +- Submit with `wingetcreate submit ` or copy this tree into a fork of `microsoft/winget-pkgs` under the same path. +Winget manifests + +- Templates live under `cli/packaging/winget/template/` and use placeholders: + - `{{VERSION}}`, `{{X64_SHA256}}`, `{{ARM64_SHA256}}` +- The CI workflow `.github/workflows/winget-submit.yml`: + - Derives the version from the release tag (strips `rust-v`), + - Downloads the raw Windows EXEs from the release, + - Computes SHA256s and fills the templates, + - Validates and submits a PR to `microsoft/winget-pkgs` using `wingetcreate`. + +Setup + +- Ensure releases include raw Windows assets: + - `codex-x86_64-pc-windows-msvc.exe` + - `codex-aarch64-pc-windows-msvc.exe` +- Add a repo secret `WINGET_PUBLISH_PAT` with `repo` (or `public_repo`) scope for PR submission. + +Local test + +- Build a versioned manifest set: + - Replace placeholders in the files under `template/` and stage under `manifests/o/OpenAI/Codex//`. +- Validate: + - `wingetcreate validate manifests/o/OpenAI/Codex/` +- Install locally: + - `winget install --manifest manifests/o/OpenAI/Codex/` + diff --git a/codex-rs/cli/packaging/winget/template/OpenAI.Codex.installer.yaml b/codex-rs/cli/packaging/winget/template/OpenAI.Codex.installer.yaml new file mode 100644 index 0000000000..ae0109d1bb --- /dev/null +++ b/codex-rs/cli/packaging/winget/template/OpenAI.Codex.installer.yaml @@ -0,0 +1,17 @@ +PackageIdentifier: OpenAI.Codex +PackageVersion: {{VERSION}} +InstallerType: portable +Installers: + - Architecture: x64 + InstallerUrl: https://github.com/openai/codex/releases/download/rust-v{{VERSION}}/codex-x86_64-pc-windows-msvc.exe + InstallerSha256: {{X64_SHA256}} + Commands: + - codex + - Architecture: arm64 + InstallerUrl: https://github.com/openai/codex/releases/download/rust-v{{VERSION}}/codex-aarch64-pc-windows-msvc.exe + InstallerSha256: {{ARM64_SHA256}} + Commands: + - codex +ManifestType: installer +ManifestVersion: 1.6.0 + diff --git a/codex-rs/cli/packaging/winget/template/OpenAI.Codex.locale.en-US.yaml b/codex-rs/cli/packaging/winget/template/OpenAI.Codex.locale.en-US.yaml new file mode 100644 index 0000000000..8462e55de2 --- /dev/null +++ b/codex-rs/cli/packaging/winget/template/OpenAI.Codex.locale.en-US.yaml @@ -0,0 +1,20 @@ +PackageIdentifier: OpenAI.Codex +PackageVersion: {{VERSION}} +PackageLocale: en-US +Publisher: OpenAI +PublisherUrl: https://github.com/openai +PublisherSupportUrl: https://github.com/openai/codex/issues +PrivacyUrl: https://openai.com/policies/privacy-policy +PackageName: Codex +PackageUrl: https://github.com/openai/codex +License: Proprietary +ShortDescription: Native Codex CLI (Rust) for terminal and TUI workflows. +Moniker: codex +Tags: + - codex + - cli + - ai + - agent +ManifestType: defaultLocale +ManifestVersion: 1.6.0 + diff --git a/codex-rs/cli/packaging/winget/template/OpenAI.Codex.yaml b/codex-rs/cli/packaging/winget/template/OpenAI.Codex.yaml new file mode 100644 index 0000000000..d0563207b5 --- /dev/null +++ b/codex-rs/cli/packaging/winget/template/OpenAI.Codex.yaml @@ -0,0 +1,6 @@ +PackageIdentifier: OpenAI.Codex +PackageVersion: {{VERSION}} +DefaultLocale: en-US +ManifestType: version +ManifestVersion: 1.6.0 + From 46bd754a02c7aefc70698417f4ec151c1c0c031e Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Mon, 10 Nov 2025 20:30:00 -0800 Subject: [PATCH 02/20] fix exe path for sha calculation --- .github/workflows/rust-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 298d02d247..ae158472c5 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -402,8 +402,8 @@ jobs: shell: bash run: | set -euo pipefail - x64_sha=$(sha256sum "dist/x86_64-pc-windows-msvc/codex-x86_64-pc-windows-msvc.exe" | awk '{print $1}') - arm_sha=$(sha256sum "dist/aarch64-pc-windows-msvc/codex-aarch64-pc-windows-msvc.exe" | awk '{print $1}') + x64_sha=$(sha256sum "dist/x86_64-pc-windows-msvc/codex-rs/dist/x86_64-pc-windows-msvc/codex-x86_64-pc-windows-msvc.exe" | awk '{print $1}') + arm_sha=$(sha256sum "dist/aarch64-pc-windows-msvc/codex-rs/dist/aarch64-pc-windows-msvc/codex-aarch64-pc-windows-msvc.exe" | awk '{print $1}') echo "x64_sha256=${x64_sha}" >> "$GITHUB_OUTPUT" echo "arm64_sha256=${arm_sha}" >> "$GITHUB_OUTPUT" From 1516a3a534f9cda48cef16f61c36429ff86d792c Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Mon, 10 Nov 2025 20:56:34 -0800 Subject: [PATCH 03/20] testing command --- .github/workflows/rust-release.yml | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index ae158472c5..47a9d777f1 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -10,6 +10,20 @@ on: push: tags: - "rust-v*.*.*" + workflow_dispatch: + inputs: + version: + description: "Release version (e.g., 0.57.0)" + required: true + type: string + x64_sha256: + description: "SHA256 for codex-x86_64-pc-windows-msvc.exe" + required: true + type: string + arm64_sha256: + description: "SHA256 for codex-aarch64-pc-windows-msvc.exe" + required: true + type: string concurrency: group: ${{ github.workflow }} @@ -573,3 +587,43 @@ jobs: secrets: WINGET_PUBLISH_PAT: ${{ secrets.WINGET_PUBLISH_PAT }} continue-on-error: true + + winget-manual: + if: ${{ github.event_name == 'workflow_dispatch' }} + needs: hash-manual + uses: ./.github/workflows/winget-submit.yml + with: + version: 0.58.0-alpha.3 + x64_sha256: ${{ needs.hash-manual.outputs.x64_sha256 }} + arm64_sha256: ${{ needs.hash-manual.outputs.arm64_sha256 }} + continue-on-error: true + + hash-manual: + if: ${{ github.event_name == 'workflow_dispatch' }} + runs-on: ubuntu-latest + permissions: + contents: read + outputs: + x64_sha256: ${{ steps.hash.outputs.x64_sha256 }} + arm64_sha256: ${{ steps.hash.outputs.arm64_sha256 }} + steps: + - name: Checkout repo + uses: actions/checkout@v5 + - name: Download Windows EXEs from release rust-v0.58.0-alpha.3 + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + tag="rust-v0.58.0-alpha.3" + mkdir -p dist + gh release download "$tag" --repo "${GITHUB_REPOSITORY}" --pattern "codex-x86_64-pc-windows-msvc.exe" --dir dist + gh release download "$tag" --repo "${GITHUB_REPOSITORY}" --pattern "codex-aarch64-pc-windows-msvc.exe" --dir dist + ls -l dist + - name: Compute SHA256 + id: hash + run: | + set -euo pipefail + x64_sha=$(sha256sum "dist/codex-x86_64-pc-windows-msvc.exe" | awk '{print $1}') + arm_sha=$(sha256sum "dist/codex-aarch64-pc-windows-msvc.exe" | awk '{print $1}') + echo "x64_sha256=${x64_sha}" >> "$GITHUB_OUTPUT" + echo "arm64_sha256=${arm_sha}" >> "$GITHUB_OUTPUT" From c4fa92ffc89ac974514dbc5054f67089a0cf2b11 Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Mon, 10 Nov 2025 21:03:23 -0800 Subject: [PATCH 04/20] testing command --- .github/workflows/rust-release.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 47a9d777f1..249c3d5717 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -11,19 +11,7 @@ on: tags: - "rust-v*.*.*" workflow_dispatch: - inputs: - version: - description: "Release version (e.g., 0.57.0)" - required: true - type: string - x64_sha256: - description: "SHA256 for codex-x86_64-pc-windows-msvc.exe" - required: true - type: string - arm64_sha256: - description: "SHA256 for codex-aarch64-pc-windows-msvc.exe" - required: true - type: string + {} concurrency: group: ${{ github.workflow }} From 40168d541bc4acf59cb52dc0b3434ef7f0d374ec Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Mon, 10 Nov 2025 21:11:53 -0800 Subject: [PATCH 05/20] fix continue-on-error --- .github/workflows/rust-release.yml | 2 -- .github/workflows/winget-submit.yml | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 249c3d5717..365486c31a 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -574,7 +574,6 @@ jobs: arm64_sha256: ${{ needs.release.outputs.arm64_sha256 }} secrets: WINGET_PUBLISH_PAT: ${{ secrets.WINGET_PUBLISH_PAT }} - continue-on-error: true winget-manual: if: ${{ github.event_name == 'workflow_dispatch' }} @@ -584,7 +583,6 @@ jobs: version: 0.58.0-alpha.3 x64_sha256: ${{ needs.hash-manual.outputs.x64_sha256 }} arm64_sha256: ${{ needs.hash-manual.outputs.arm64_sha256 }} - continue-on-error: true hash-manual: if: ${{ github.event_name == 'workflow_dispatch' }} diff --git a/.github/workflows/winget-submit.yml b/.github/workflows/winget-submit.yml index 72ee2ef46c..3875915be5 100644 --- a/.github/workflows/winget-submit.yml +++ b/.github/workflows/winget-submit.yml @@ -37,6 +37,7 @@ jobs: - name: Build manifest directory shell: bash + continue-on-error: true run: | set -euo pipefail v="$VERSION" @@ -53,10 +54,12 @@ jobs: - name: Install WinGet Create shell: bash + continue-on-error: true run: winget install --id Microsoft.WingetCreate -e --accept-package-agreements --accept-source-agreements - name: Validate manifests shell: bash + continue-on-error: true run: wingetcreate validate "manifests/o/OpenAI/Codex/${{ inputs.version }}" # - name: Submit PR to winget-pkgs From 4af1ed64d8a7416bc4d53a5744b37f8970b7b55b Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Mon, 10 Nov 2025 21:17:53 -0800 Subject: [PATCH 06/20] testing command --- .github/workflows/rust-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 365486c31a..e802db0d0e 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -572,8 +572,8 @@ jobs: version: ${{ needs.release.outputs.version }} x64_sha256: ${{ needs.release.outputs.x64_sha256 }} arm64_sha256: ${{ needs.release.outputs.arm64_sha256 }} - secrets: - WINGET_PUBLISH_PAT: ${{ secrets.WINGET_PUBLISH_PAT }} + # secrets: + # WINGET_PUBLISH_PAT: ${{ secrets.WINGET_PUBLISH_PAT }} winget-manual: if: ${{ github.event_name == 'workflow_dispatch' }} From 4ad5549cb798f127e7e0f10cb7aa716a7e5d12a7 Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Mon, 10 Nov 2025 21:20:37 -0800 Subject: [PATCH 07/20] fix winget validate command --- .github/workflows/winget-submit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/winget-submit.yml b/.github/workflows/winget-submit.yml index 3875915be5..4ff3576f5b 100644 --- a/.github/workflows/winget-submit.yml +++ b/.github/workflows/winget-submit.yml @@ -60,7 +60,7 @@ jobs: - name: Validate manifests shell: bash continue-on-error: true - run: wingetcreate validate "manifests/o/OpenAI/Codex/${{ inputs.version }}" + run: winget validate "manifests/o/OpenAI/Codex/${{ inputs.version }}" # - name: Submit PR to winget-pkgs # env: From d5a08c7bd2a3c210112b911bd781da750d6a1cf6 Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Mon, 10 Nov 2025 21:23:50 -0800 Subject: [PATCH 08/20] fix winget template path --- .github/workflows/winget-submit.yml | 2 +- .../cli/packaging/winget/template/OpenAI.Codex.installer.yaml | 3 +-- .../packaging/winget/template/OpenAI.Codex.locale.en-US.yaml | 3 +-- codex-rs/cli/packaging/winget/template/OpenAI.Codex.yaml | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/winget-submit.yml b/.github/workflows/winget-submit.yml index 4ff3576f5b..71e57902d1 100644 --- a/.github/workflows/winget-submit.yml +++ b/.github/workflows/winget-submit.yml @@ -42,7 +42,7 @@ jobs: set -euo pipefail v="$VERSION" root="manifests/o/OpenAI/Codex/$v" - tpl="cli/packaging/winget/template" + tpl="codex-rs/cli/packaging/winget/template" mkdir -p "$root" for f in OpenAI.Codex.yaml OpenAI.Codex.locale.en-US.yaml OpenAI.Codex.installer.yaml; do sed -e "s/{{VERSION}}/$v/g" \ diff --git a/codex-rs/cli/packaging/winget/template/OpenAI.Codex.installer.yaml b/codex-rs/cli/packaging/winget/template/OpenAI.Codex.installer.yaml index ae0109d1bb..27589598f7 100644 --- a/codex-rs/cli/packaging/winget/template/OpenAI.Codex.installer.yaml +++ b/codex-rs/cli/packaging/winget/template/OpenAI.Codex.installer.yaml @@ -13,5 +13,4 @@ Installers: Commands: - codex ManifestType: installer -ManifestVersion: 1.6.0 - +ManifestVersion: 1.5.0 diff --git a/codex-rs/cli/packaging/winget/template/OpenAI.Codex.locale.en-US.yaml b/codex-rs/cli/packaging/winget/template/OpenAI.Codex.locale.en-US.yaml index 8462e55de2..a3f741dd74 100644 --- a/codex-rs/cli/packaging/winget/template/OpenAI.Codex.locale.en-US.yaml +++ b/codex-rs/cli/packaging/winget/template/OpenAI.Codex.locale.en-US.yaml @@ -16,5 +16,4 @@ Tags: - ai - agent ManifestType: defaultLocale -ManifestVersion: 1.6.0 - +ManifestVersion: 1.5.0 diff --git a/codex-rs/cli/packaging/winget/template/OpenAI.Codex.yaml b/codex-rs/cli/packaging/winget/template/OpenAI.Codex.yaml index d0563207b5..a4d7a53860 100644 --- a/codex-rs/cli/packaging/winget/template/OpenAI.Codex.yaml +++ b/codex-rs/cli/packaging/winget/template/OpenAI.Codex.yaml @@ -2,5 +2,4 @@ PackageIdentifier: OpenAI.Codex PackageVersion: {{VERSION}} DefaultLocale: en-US ManifestType: version -ManifestVersion: 1.6.0 - +ManifestVersion: 1.5.0 From 07dc65518dc2936c36bb10270745c8fe9efb9521 Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Mon, 10 Nov 2025 21:29:53 -0800 Subject: [PATCH 09/20] remove testing code --- .github/workflows/rust-release.yml | 41 ------------------------------ 1 file changed, 41 deletions(-) diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index e802db0d0e..d54a4a5d14 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -10,8 +10,6 @@ on: push: tags: - "rust-v*.*.*" - workflow_dispatch: - {} concurrency: group: ${{ github.workflow }} @@ -574,42 +572,3 @@ jobs: arm64_sha256: ${{ needs.release.outputs.arm64_sha256 }} # secrets: # WINGET_PUBLISH_PAT: ${{ secrets.WINGET_PUBLISH_PAT }} - - winget-manual: - if: ${{ github.event_name == 'workflow_dispatch' }} - needs: hash-manual - uses: ./.github/workflows/winget-submit.yml - with: - version: 0.58.0-alpha.3 - x64_sha256: ${{ needs.hash-manual.outputs.x64_sha256 }} - arm64_sha256: ${{ needs.hash-manual.outputs.arm64_sha256 }} - - hash-manual: - if: ${{ github.event_name == 'workflow_dispatch' }} - runs-on: ubuntu-latest - permissions: - contents: read - outputs: - x64_sha256: ${{ steps.hash.outputs.x64_sha256 }} - arm64_sha256: ${{ steps.hash.outputs.arm64_sha256 }} - steps: - - name: Checkout repo - uses: actions/checkout@v5 - - name: Download Windows EXEs from release rust-v0.58.0-alpha.3 - env: - GH_TOKEN: ${{ github.token }} - run: | - set -euo pipefail - tag="rust-v0.58.0-alpha.3" - mkdir -p dist - gh release download "$tag" --repo "${GITHUB_REPOSITORY}" --pattern "codex-x86_64-pc-windows-msvc.exe" --dir dist - gh release download "$tag" --repo "${GITHUB_REPOSITORY}" --pattern "codex-aarch64-pc-windows-msvc.exe" --dir dist - ls -l dist - - name: Compute SHA256 - id: hash - run: | - set -euo pipefail - x64_sha=$(sha256sum "dist/codex-x86_64-pc-windows-msvc.exe" | awk '{print $1}') - arm_sha=$(sha256sum "dist/codex-aarch64-pc-windows-msvc.exe" | awk '{print $1}') - echo "x64_sha256=${x64_sha}" >> "$GITHUB_OUTPUT" - echo "arm64_sha256=${arm_sha}" >> "$GITHUB_OUTPUT" From d1e6b31c0b453b017bfcc6d11f569d0dfa656bb3 Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Mon, 10 Nov 2025 21:47:03 -0800 Subject: [PATCH 10/20] better variable naming for shas --- .github/workflows/rust-release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index d54a4a5d14..51266b66ce 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -383,8 +383,8 @@ jobs: tag: ${{ github.ref_name }} should_publish_npm: ${{ steps.npm_publish_settings.outputs.should_publish }} npm_tag: ${{ steps.npm_publish_settings.outputs.npm_tag }} - x64_sha256: ${{ steps.win_hash.outputs.x64_sha256 }} - arm64_sha256: ${{ steps.win_hash.outputs.arm64_sha256 }} + windows_x64_sha256: ${{ steps.win_hash.outputs.x64_sha256 }} + windows_arm64_sha256: ${{ steps.win_hash.outputs.arm64_sha256 }} steps: - name: Checkout repository @@ -568,7 +568,7 @@ jobs: uses: ./.github/workflows/winget-submit.yml with: version: ${{ needs.release.outputs.version }} - x64_sha256: ${{ needs.release.outputs.x64_sha256 }} - arm64_sha256: ${{ needs.release.outputs.arm64_sha256 }} + x64_sha256: ${{ needs.release.outputs.windows_x64_sha256 }} + arm64_sha256: ${{ needs.release.outputs.windows_arm64_sha256 }} # secrets: # WINGET_PUBLISH_PAT: ${{ secrets.WINGET_PUBLISH_PAT }} From eed6d6c24a55e0b93ead88304a63cc682a87fb06 Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Mon, 10 Nov 2025 22:05:32 -0800 Subject: [PATCH 11/20] minor cleanups to winget submit workflow --- .github/workflows/winget-submit.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/winget-submit.yml b/.github/workflows/winget-submit.yml index 71e57902d1..1e6dfe136d 100644 --- a/.github/workflows/winget-submit.yml +++ b/.github/workflows/winget-submit.yml @@ -1,4 +1,4 @@ -name: Winget Submit (Reusable) +name: Winget Submit on: workflow_call: @@ -32,20 +32,16 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - # Assumes inputs.x64_sha256 and inputs.arm64_sha256 are provided - - name: Build manifest directory shell: bash continue-on-error: true run: | set -euo pipefail - v="$VERSION" - root="manifests/o/OpenAI/Codex/$v" + root="manifests/o/OpenAI/Codex/$VERSION" tpl="codex-rs/cli/packaging/winget/template" mkdir -p "$root" for f in OpenAI.Codex.yaml OpenAI.Codex.locale.en-US.yaml OpenAI.Codex.installer.yaml; do - sed -e "s/{{VERSION}}/$v/g" \ + sed -e "s/{{VERSION}}/$VERSION/g" \ -e "s/{{X64_SHA256}}/$X64_SHA/g" \ -e "s/{{ARM64_SHA256}}/$ARM_SHA/g" \ "$tpl/$f" > "$root/$f" From 38a11251bc8a7fc503ef7993945636f6ccbe2fae Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Wed, 12 Nov 2025 13:23:50 -0800 Subject: [PATCH 12/20] move templates, create composite action for winget. --- .github/actions/winget-submit/action.yml | 47 +++++++++++++++++++ .github/workflows/rust-release.yml | 16 ++++--- codex-rs/cli/packaging/winget/README.md | 15 +++--- .../template/OpenAI.Codex.installer.yaml | 16 ------- .../template/OpenAI.Codex.locale.en-US.yaml | 19 -------- .../winget/template/OpenAI.Codex.yaml | 5 -- 6 files changed, 62 insertions(+), 56 deletions(-) create mode 100644 .github/actions/winget-submit/action.yml delete mode 100644 codex-rs/cli/packaging/winget/template/OpenAI.Codex.installer.yaml delete mode 100644 codex-rs/cli/packaging/winget/template/OpenAI.Codex.locale.en-US.yaml delete mode 100644 codex-rs/cli/packaging/winget/template/OpenAI.Codex.yaml diff --git a/.github/actions/winget-submit/action.yml b/.github/actions/winget-submit/action.yml new file mode 100644 index 0000000000..52c78215d7 --- /dev/null +++ b/.github/actions/winget-submit/action.yml @@ -0,0 +1,47 @@ +name: Winget Submit (Composite) +description: Template + validate WinGet manifests for Codex +inputs: + version: + description: Release version (e.g., 0.58.0) + required: true + x64_sha256: + description: SHA256 for codex-x86_64-pc-windows-msvc.exe + required: true + arm64_sha256: + description: SHA256 for codex-aarch64-pc-windows-msvc.exe + required: true +runs: + using: composite + steps: + - name: Build manifest directory + shell: bash + continue-on-error: true + run: | + set -euo pipefail + # Mirror the winget-pkgs repo layout so validation matches what + # we will submit: + # manifests///// + # For OpenAI.Codex vX.Y.Z → manifests/o/OpenAI/Codex/X.Y.Z + VERSION="${{ inputs.version }}" + X64_SHA="${{ inputs.x64_sha256 }}" + ARM_SHA="${{ inputs.arm64_sha256 }}" + root="manifests/o/OpenAI/Codex/$VERSION" + tpl=".github/winget_templates" + mkdir -p "$root" + for f in OpenAI.Codex.yaml OpenAI.Codex.locale.en-US.yaml OpenAI.Codex.installer.yaml; do + sed -e "s/{{VERSION}}/$VERSION/g" \ + -e "s/{{X64_SHA256}}/$X64_SHA/g" \ + -e "s/{{ARM64_SHA256}}/$ARM_SHA/g" \ + "$tpl/$f" > "$root/$f" + done + echo "Manifest staged at $root" + + - name: Install WinGet Create + shell: bash + continue-on-error: true + run: winget install --id Microsoft.WingetCreate -e --accept-package-agreements --accept-source-agreements + + - name: Validate manifests + shell: bash + continue-on-error: true + run: winget validate "manifests/o/OpenAI/Codex/${{ inputs.version }}" diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 51266b66ce..c3efd5f408 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -565,10 +565,12 @@ jobs: winget: needs: release - uses: ./.github/workflows/winget-submit.yml - with: - version: ${{ needs.release.outputs.version }} - x64_sha256: ${{ needs.release.outputs.windows_x64_sha256 }} - arm64_sha256: ${{ needs.release.outputs.windows_arm64_sha256 }} - # secrets: - # WINGET_PUBLISH_PAT: ${{ secrets.WINGET_PUBLISH_PAT }} + runs-on: windows-latest + steps: + - uses: actions/checkout@v5 + - name: Validate WinGet manifests + uses: ./.github/actions/winget-submit + with: + version: ${{ needs.release.outputs.version }} + x64_sha256: ${{ needs.release.outputs.windows_x64_sha256 }} + arm64_sha256: ${{ needs.release.outputs.windows_arm64_sha256 }} diff --git a/codex-rs/cli/packaging/winget/README.md b/codex-rs/cli/packaging/winget/README.md index 8858074b1d..106491955d 100644 --- a/codex-rs/cli/packaging/winget/README.md +++ b/codex-rs/cli/packaging/winget/README.md @@ -2,8 +2,8 @@ WinGet manifests for the Codex CLI Local testing -- Validate: `wingetcreate validate .\\cli\\packaging\\winget\\manifests\\o\\OpenAI\\Codex\\0.57.0` -- Install from local manifests: `winget install --manifest .\\cli\\packaging\\winget\\manifests\\o\\OpenAI\\Codex\\0.57.0` +- Validate: `winget validate .\manifests\o\OpenAI\Codex\0.57.0` +- Install from local manifests: `winget install --manifest .\manifests\o\OpenAI\Codex\0.57.0` - Verify: `codex --version` and `where codex` - Uninstall: `winget uninstall OpenAI.Codex` @@ -13,13 +13,11 @@ Submitting to winget-pkgs - Submit with `wingetcreate submit ` or copy this tree into a fork of `microsoft/winget-pkgs` under the same path. Winget manifests -- Templates live under `cli/packaging/winget/template/` and use placeholders: +- Templates live under `.github/winget_templates/` and use placeholders: - `{{VERSION}}`, `{{X64_SHA256}}`, `{{ARM64_SHA256}}` -- The CI workflow `.github/workflows/winget-submit.yml`: - - Derives the version from the release tag (strips `rust-v`), - - Downloads the raw Windows EXEs from the release, - - Computes SHA256s and fills the templates, - - Validates and submits a PR to `microsoft/winget-pkgs` using `wingetcreate`. +- The CI calls a composite action (`.github/actions/winget-submit`) from the release job: + - Fills the templates using the release version and precomputed SHA256s, + - Validates the manifests with `winget validate` (submission is separate). Setup @@ -36,4 +34,3 @@ Local test - `wingetcreate validate manifests/o/OpenAI/Codex/` - Install locally: - `winget install --manifest manifests/o/OpenAI/Codex/` - diff --git a/codex-rs/cli/packaging/winget/template/OpenAI.Codex.installer.yaml b/codex-rs/cli/packaging/winget/template/OpenAI.Codex.installer.yaml deleted file mode 100644 index 27589598f7..0000000000 --- a/codex-rs/cli/packaging/winget/template/OpenAI.Codex.installer.yaml +++ /dev/null @@ -1,16 +0,0 @@ -PackageIdentifier: OpenAI.Codex -PackageVersion: {{VERSION}} -InstallerType: portable -Installers: - - Architecture: x64 - InstallerUrl: https://github.com/openai/codex/releases/download/rust-v{{VERSION}}/codex-x86_64-pc-windows-msvc.exe - InstallerSha256: {{X64_SHA256}} - Commands: - - codex - - Architecture: arm64 - InstallerUrl: https://github.com/openai/codex/releases/download/rust-v{{VERSION}}/codex-aarch64-pc-windows-msvc.exe - InstallerSha256: {{ARM64_SHA256}} - Commands: - - codex -ManifestType: installer -ManifestVersion: 1.5.0 diff --git a/codex-rs/cli/packaging/winget/template/OpenAI.Codex.locale.en-US.yaml b/codex-rs/cli/packaging/winget/template/OpenAI.Codex.locale.en-US.yaml deleted file mode 100644 index a3f741dd74..0000000000 --- a/codex-rs/cli/packaging/winget/template/OpenAI.Codex.locale.en-US.yaml +++ /dev/null @@ -1,19 +0,0 @@ -PackageIdentifier: OpenAI.Codex -PackageVersion: {{VERSION}} -PackageLocale: en-US -Publisher: OpenAI -PublisherUrl: https://github.com/openai -PublisherSupportUrl: https://github.com/openai/codex/issues -PrivacyUrl: https://openai.com/policies/privacy-policy -PackageName: Codex -PackageUrl: https://github.com/openai/codex -License: Proprietary -ShortDescription: Native Codex CLI (Rust) for terminal and TUI workflows. -Moniker: codex -Tags: - - codex - - cli - - ai - - agent -ManifestType: defaultLocale -ManifestVersion: 1.5.0 diff --git a/codex-rs/cli/packaging/winget/template/OpenAI.Codex.yaml b/codex-rs/cli/packaging/winget/template/OpenAI.Codex.yaml deleted file mode 100644 index a4d7a53860..0000000000 --- a/codex-rs/cli/packaging/winget/template/OpenAI.Codex.yaml +++ /dev/null @@ -1,5 +0,0 @@ -PackageIdentifier: OpenAI.Codex -PackageVersion: {{VERSION}} -DefaultLocale: en-US -ManifestType: version -ManifestVersion: 1.5.0 From 7b269728f81ec5b007b1e22795fcbc58c1fcabeb Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Wed, 12 Nov 2025 13:26:24 -0800 Subject: [PATCH 13/20] update comment. --- .github/actions/winget-submit/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/winget-submit/action.yml b/.github/actions/winget-submit/action.yml index 52c78215d7..5765c71dde 100644 --- a/.github/actions/winget-submit/action.yml +++ b/.github/actions/winget-submit/action.yml @@ -1,5 +1,5 @@ -name: Winget Submit (Composite) -description: Template + validate WinGet manifests for Codex +name: Winget Submit +description: Template + validate + submission of WinGet manifests for Codex inputs: version: description: Release version (e.g., 0.58.0) From 1320988156303406f5137dcaeeb5bb7bfd415cf1 Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Wed, 12 Nov 2025 13:36:42 -0800 Subject: [PATCH 14/20] consistent use of windows_ prefix --- .github/actions/winget-submit/action.yml | 12 ++++++------ .github/workflows/rust-release.yml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/actions/winget-submit/action.yml b/.github/actions/winget-submit/action.yml index 5765c71dde..3465d40b95 100644 --- a/.github/actions/winget-submit/action.yml +++ b/.github/actions/winget-submit/action.yml @@ -4,11 +4,11 @@ inputs: version: description: Release version (e.g., 0.58.0) required: true - x64_sha256: - description: SHA256 for codex-x86_64-pc-windows-msvc.exe + windows_x64_sha256: + description: Windows x64 SHA256 for codex-x86_64-pc-windows-msvc.exe required: true - arm64_sha256: - description: SHA256 for codex-aarch64-pc-windows-msvc.exe + windows_arm64_sha256: + description: Windows arm64 SHA256 for codex-aarch64-pc-windows-msvc.exe required: true runs: using: composite @@ -23,8 +23,8 @@ runs: # manifests///// # For OpenAI.Codex vX.Y.Z → manifests/o/OpenAI/Codex/X.Y.Z VERSION="${{ inputs.version }}" - X64_SHA="${{ inputs.x64_sha256 }}" - ARM_SHA="${{ inputs.arm64_sha256 }}" + X64_SHA="${{ inputs.windows_x64_sha256 }}" + ARM_SHA="${{ inputs.windows_arm64_sha256 }}" root="manifests/o/OpenAI/Codex/$VERSION" tpl=".github/winget_templates" mkdir -p "$root" diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index c3efd5f408..b9f2e8de4f 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -383,8 +383,8 @@ jobs: tag: ${{ github.ref_name }} should_publish_npm: ${{ steps.npm_publish_settings.outputs.should_publish }} npm_tag: ${{ steps.npm_publish_settings.outputs.npm_tag }} - windows_x64_sha256: ${{ steps.win_hash.outputs.x64_sha256 }} - windows_arm64_sha256: ${{ steps.win_hash.outputs.arm64_sha256 }} + windows_x64_sha256: ${{ steps.win_hash.outputs.windows_x64_sha256 }} + windows_arm64_sha256: ${{ steps.win_hash.outputs.windows_arm64_sha256 }} steps: - name: Checkout repository @@ -404,8 +404,8 @@ jobs: set -euo pipefail x64_sha=$(sha256sum "dist/x86_64-pc-windows-msvc/codex-rs/dist/x86_64-pc-windows-msvc/codex-x86_64-pc-windows-msvc.exe" | awk '{print $1}') arm_sha=$(sha256sum "dist/aarch64-pc-windows-msvc/codex-rs/dist/aarch64-pc-windows-msvc/codex-aarch64-pc-windows-msvc.exe" | awk '{print $1}') - echo "x64_sha256=${x64_sha}" >> "$GITHUB_OUTPUT" - echo "arm64_sha256=${arm_sha}" >> "$GITHUB_OUTPUT" + echo "windows_x64_sha256=${x64_sha}" >> "$GITHUB_OUTPUT" + echo "windows_arm64_sha256=${arm_sha}" >> "$GITHUB_OUTPUT" - name: Define release name id: release_name @@ -572,5 +572,5 @@ jobs: uses: ./.github/actions/winget-submit with: version: ${{ needs.release.outputs.version }} - x64_sha256: ${{ needs.release.outputs.windows_x64_sha256 }} - arm64_sha256: ${{ needs.release.outputs.windows_arm64_sha256 }} + windows_x64_sha256: ${{ needs.release.outputs.windows_x64_sha256 }} + windows_arm64_sha256: ${{ needs.release.outputs.windows_arm64_sha256 }} From b66fa4a0b173ef8ee012faf7b298c8c83aa7a568 Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Wed, 12 Nov 2025 13:46:02 -0800 Subject: [PATCH 15/20] temporary testing code. --- .github/workflows/rust-release.yml | 46 +++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index b9f2e8de4f..5332edbcb4 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -10,6 +10,7 @@ on: push: tags: - "rust-v*.*.*" + workflow_dispatch: {} concurrency: group: ${{ github.workflow }} @@ -573,4 +574,47 @@ jobs: with: version: ${{ needs.release.outputs.version }} windows_x64_sha256: ${{ needs.release.outputs.windows_x64_sha256 }} - windows_arm64_sha256: ${{ needs.release.outputs.windows_arm64_sha256 }} + windows_arm64_sha256: ${{ needs.release.outputs.windows_arm64_sha256 }} + + hash-manual: + if: ${{ github.event_name == 'workflow_dispatch' }} + runs-on: ubuntu-latest + permissions: + contents: read + outputs: + windows_x64_sha256: ${{ steps.hash.outputs.windows_x64_sha256 }} + windows_arm64_sha256: ${{ steps.hash.outputs.windows_arm64_sha256 }} + steps: + - name: Checkout repo + uses: actions/checkout@v5 + - name: Download Windows EXEs from release rust-v0.58.0-alpha.3 + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + tag="rust-v0.58.0-alpha.3" + mkdir -p dist + gh release download "$tag" --repo "${GITHUB_REPOSITORY}" --pattern "codex-x86_64-pc-windows-msvc.exe" --dir dist + gh release download "$tag" --repo "${GITHUB_REPOSITORY}" --pattern "codex-aarch64-pc-windows-msvc.exe" --dir dist + ls -l dist + - name: Compute SHA256 (manual) + id: hash + run: | + set -euo pipefail + x64_sha=$(sha256sum "dist/codex-x86_64-pc-windows-msvc.exe" | awk '{print $1}') + arm_sha=$(sha256sum "dist/codex-aarch64-pc-windows-msvc.exe" | awk '{print $1}') + echo "windows_x64_sha256=${x64_sha}" >> "$GITHUB_OUTPUT" + echo "windows_arm64_sha256=${arm_sha}" >> "$GITHUB_OUTPUT" + + winget-manual: + if: ${{ github.event_name == 'workflow_dispatch' }} + needs: hash-manual + runs-on: windows-latest + steps: + - uses: actions/checkout@v5 + - name: Validate WinGet manifests (manual) + uses: ./.github/actions/winget-submit + with: + version: 0.58.0-alpha.3 + windows_x64_sha256: ${{ needs.hash-manual.outputs.windows_x64_sha256 }} + windows_arm64_sha256: ${{ needs.hash-manual.outputs.windows_arm64_sha256 }} From 957c5cf99f1bb6ff173733ee412f24466775fb50 Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Wed, 12 Nov 2025 13:48:30 -0800 Subject: [PATCH 16/20] temporary testing code. --- .github/workflows/rust-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 5332edbcb4..b0a7b6f31d 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -574,7 +574,7 @@ jobs: with: version: ${{ needs.release.outputs.version }} windows_x64_sha256: ${{ needs.release.outputs.windows_x64_sha256 }} - windows_arm64_sha256: ${{ needs.release.outputs.windows_arm64_sha256 }} + windows_arm64_sha256: ${{ needs.release.outputs.windows_arm64_sha256 }} hash-manual: if: ${{ github.event_name == 'workflow_dispatch' }} From edb4ece928905cc4654b2be341f5a31da6053933 Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Wed, 12 Nov 2025 13:51:41 -0800 Subject: [PATCH 17/20] forgot to add the template yaml files. --- .github/winget_templates/OpenAI.Codex.installer.yaml | 1 + .github/winget_templates/OpenAI.Codex.locale.en-US.yaml | 1 + .github/winget_templates/OpenAI.Codex.yaml | 1 + 3 files changed, 3 insertions(+) create mode 100644 .github/winget_templates/OpenAI.Codex.installer.yaml create mode 100644 .github/winget_templates/OpenAI.Codex.locale.en-US.yaml create mode 100644 .github/winget_templates/OpenAI.Codex.yaml diff --git a/.github/winget_templates/OpenAI.Codex.installer.yaml b/.github/winget_templates/OpenAI.Codex.installer.yaml new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/.github/winget_templates/OpenAI.Codex.installer.yaml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.github/winget_templates/OpenAI.Codex.locale.en-US.yaml b/.github/winget_templates/OpenAI.Codex.locale.en-US.yaml new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/.github/winget_templates/OpenAI.Codex.locale.en-US.yaml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.github/winget_templates/OpenAI.Codex.yaml b/.github/winget_templates/OpenAI.Codex.yaml new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/.github/winget_templates/OpenAI.Codex.yaml @@ -0,0 +1 @@ + \ No newline at end of file From 84f120cc006d980708ab18f04bb0853bff4f953b Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Wed, 12 Nov 2025 14:12:14 -0800 Subject: [PATCH 18/20] template contents. --- .../OpenAI.Codex.installer.yaml | 18 ++++++++++++++++- .../OpenAI.Codex.locale.en-US.yaml | 20 ++++++++++++++++++- .github/winget_templates/OpenAI.Codex.yaml | 6 +++++- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/.github/winget_templates/OpenAI.Codex.installer.yaml b/.github/winget_templates/OpenAI.Codex.installer.yaml index 5f282702bb..e80830cf69 100644 --- a/.github/winget_templates/OpenAI.Codex.installer.yaml +++ b/.github/winget_templates/OpenAI.Codex.installer.yaml @@ -1 +1,17 @@ - \ No newline at end of file +PackageIdentifier: OpenAI.Codex +PackageVersion: {{VERSION}} +Installers: + - Architecture: x64 + InstallerType: portable + InstallerUrl: https://github.com/openai/codex/releases/download/rust-v{{VERSION}}/codex-x86_64-pc-windows-msvc.exe + InstallerSha256: {{X64_SHA256}} + Commands: + - codex + - Architecture: arm64 + InstallerType: portable + InstallerUrl: https://github.com/openai/codex/releases/download/rust-v{{VERSION}}/codex-aarch64-pc-windows-msvc.exe + InstallerSha256: {{ARM64_SHA256}} + Commands: + - codex +ManifestType: installer +ManifestVersion: 1.5.0 diff --git a/.github/winget_templates/OpenAI.Codex.locale.en-US.yaml b/.github/winget_templates/OpenAI.Codex.locale.en-US.yaml index 5f282702bb..c9efb0a937 100644 --- a/.github/winget_templates/OpenAI.Codex.locale.en-US.yaml +++ b/.github/winget_templates/OpenAI.Codex.locale.en-US.yaml @@ -1 +1,19 @@ - \ No newline at end of file +PackageIdentifier: OpenAI.Codex +PackageVersion: {{VERSION}} +PackageLocale: en-US +Publisher: OpenAI +PublisherUrl: https://github.com/openai +PublisherSupportUrl: https://github.com/openai/codex/issues +PrivacyUrl: https://openai.com/policies/privacy-policy +PackageName: Codex +PackageUrl: https://github.com/openai/codex +License: Proprietary +ShortDescription: Native Codex CLI (Rust) for terminal and TUI workflows. +Moniker: codex +Tags: + - codex + - cli + - ai + - agent +ManifestType: defaultLocale +ManifestVersion: 1.5.0 diff --git a/.github/winget_templates/OpenAI.Codex.yaml b/.github/winget_templates/OpenAI.Codex.yaml index 5f282702bb..daf0a45dc1 100644 --- a/.github/winget_templates/OpenAI.Codex.yaml +++ b/.github/winget_templates/OpenAI.Codex.yaml @@ -1 +1,5 @@ - \ No newline at end of file +PackageIdentifier: OpenAI.Codex +PackageVersion: {{VERSION}} +DefaultLocale: en-US +ManifestType: version +ManifestVersion: 1.5.0 From 4183cd0aec7215d7122ec2bdb6d3a524a2e7ea74 Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Wed, 12 Nov 2025 14:18:13 -0800 Subject: [PATCH 19/20] remove testing code --- .github/workflows/rust-release.yml | 44 ------------------------------ 1 file changed, 44 deletions(-) diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index b0a7b6f31d..b9f2e8de4f 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -10,7 +10,6 @@ on: push: tags: - "rust-v*.*.*" - workflow_dispatch: {} concurrency: group: ${{ github.workflow }} @@ -575,46 +574,3 @@ jobs: version: ${{ needs.release.outputs.version }} windows_x64_sha256: ${{ needs.release.outputs.windows_x64_sha256 }} windows_arm64_sha256: ${{ needs.release.outputs.windows_arm64_sha256 }} - - hash-manual: - if: ${{ github.event_name == 'workflow_dispatch' }} - runs-on: ubuntu-latest - permissions: - contents: read - outputs: - windows_x64_sha256: ${{ steps.hash.outputs.windows_x64_sha256 }} - windows_arm64_sha256: ${{ steps.hash.outputs.windows_arm64_sha256 }} - steps: - - name: Checkout repo - uses: actions/checkout@v5 - - name: Download Windows EXEs from release rust-v0.58.0-alpha.3 - env: - GH_TOKEN: ${{ github.token }} - run: | - set -euo pipefail - tag="rust-v0.58.0-alpha.3" - mkdir -p dist - gh release download "$tag" --repo "${GITHUB_REPOSITORY}" --pattern "codex-x86_64-pc-windows-msvc.exe" --dir dist - gh release download "$tag" --repo "${GITHUB_REPOSITORY}" --pattern "codex-aarch64-pc-windows-msvc.exe" --dir dist - ls -l dist - - name: Compute SHA256 (manual) - id: hash - run: | - set -euo pipefail - x64_sha=$(sha256sum "dist/codex-x86_64-pc-windows-msvc.exe" | awk '{print $1}') - arm_sha=$(sha256sum "dist/codex-aarch64-pc-windows-msvc.exe" | awk '{print $1}') - echo "windows_x64_sha256=${x64_sha}" >> "$GITHUB_OUTPUT" - echo "windows_arm64_sha256=${arm_sha}" >> "$GITHUB_OUTPUT" - - winget-manual: - if: ${{ github.event_name == 'workflow_dispatch' }} - needs: hash-manual - runs-on: windows-latest - steps: - - uses: actions/checkout@v5 - - name: Validate WinGet manifests (manual) - uses: ./.github/actions/winget-submit - with: - version: 0.58.0-alpha.3 - windows_x64_sha256: ${{ needs.hash-manual.outputs.windows_x64_sha256 }} - windows_arm64_sha256: ${{ needs.hash-manual.outputs.windows_arm64_sha256 }} From 45474cf07f5e7cb7732a5ae9404082640a075c3c Mon Sep 17 00:00:00 2001 From: iceweasel-oai Date: Wed, 12 Nov 2025 14:28:06 -0800 Subject: [PATCH 20/20] remove unused workflow --- .github/workflows/winget-submit.yml | 65 ----------------------------- 1 file changed, 65 deletions(-) delete mode 100644 .github/workflows/winget-submit.yml diff --git a/.github/workflows/winget-submit.yml b/.github/workflows/winget-submit.yml deleted file mode 100644 index 1e6dfe136d..0000000000 --- a/.github/workflows/winget-submit.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Winget Submit - -on: - workflow_call: - inputs: - version: - description: "Release version (e.g., 0.57.0)" - required: true - type: string - x64_sha256: - description: "Precomputed SHA256 for x64 EXE" - required: true - type: string - arm64_sha256: - description: "Precomputed SHA256 for arm64 EXE" - required: true - type: string - # secrets: - # WINGET_PUBLISH_PAT: - # required: true - -jobs: - submit-winget: - runs-on: windows-latest - permissions: - contents: read - env: - REPO: ${{ github.repository }} - VERSION: ${{ inputs.version }} - X64_SHA: ${{ inputs.x64_sha256 }} - ARM_SHA: ${{ inputs.arm64_sha256 }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build manifest directory - shell: bash - continue-on-error: true - run: | - set -euo pipefail - root="manifests/o/OpenAI/Codex/$VERSION" - tpl="codex-rs/cli/packaging/winget/template" - mkdir -p "$root" - for f in OpenAI.Codex.yaml OpenAI.Codex.locale.en-US.yaml OpenAI.Codex.installer.yaml; do - sed -e "s/{{VERSION}}/$VERSION/g" \ - -e "s/{{X64_SHA256}}/$X64_SHA/g" \ - -e "s/{{ARM64_SHA256}}/$ARM_SHA/g" \ - "$tpl/$f" > "$root/$f" - done - echo "Manifest staged at $root" - - - name: Install WinGet Create - shell: bash - continue-on-error: true - run: winget install --id Microsoft.WingetCreate -e --accept-package-agreements --accept-source-agreements - - - name: Validate manifests - shell: bash - continue-on-error: true - run: winget validate "manifests/o/OpenAI/Codex/${{ inputs.version }}" - - # - name: Submit PR to winget-pkgs - # env: - # GITHUB_TOKEN: ${{ secrets.WINGET_PUBLISH_PAT }} - # shell: bash - # run: wingetcreate submit "manifests/o/OpenAI/Codex/${{ inputs.version }}"