Skip to content
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
75 changes: 75 additions & 0 deletions .github/ISSUE_TEMPLATE/build_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Build Request
description: Request a pre-built binary for a runtime version that is not currently available
title: "build({runtime}): {version} {platform}"
labels: ["build-request"]
body:
- type: markdown
attributes:
value: |
**Thanks for requesting a build!** This form helps us provide pre-built binaries for runtime versions that aren't currently available.

**Tip:** You can also use `dtvem request <runtime> <version>` to open this form with pre-filled values.

- type: dropdown
id: runtime
attributes:
label: Runtime
description: Which runtime do you need?
options:
- python
- node
- ruby
validations:
required: true

- type: input
id: version
attributes:
label: Version
description: What version do you need?
placeholder: "e.g., 3.6.15, 2.7.8, 18.0.0"
validations:
required: true

- type: dropdown
id: platform
attributes:
label: Platform
description: What platform do you need the build for?
options:
- windows-amd64
- windows-arm64
- darwin-amd64
- darwin-arm64
- linux-amd64
- linux-arm64
validations:
required: true

- type: textarea
id: use-case
attributes:
label: Use Case
description: Why do you need this specific version? (optional, but helps us prioritize)
placeholder: |
e.g., "Legacy project requires Python 3.6 compatibility"
e.g., "Testing backward compatibility with older Node.js versions"
validations:
required: false

- type: textarea
id: context
attributes:
label: Additional Context
description: Any other information that might be helpful
validations:
required: false

- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this request, you agree to follow our [Code of Conduct](https://github.com/dtvem/dtvem/blob/main/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
48 changes: 48 additions & 0 deletions .github/workflows/deploy-manifests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy Manifests

on:
push:
branches:
- main
paths:
- 'src/internal/manifest/data/*.json'
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure AWS CLI for R2
run: |
aws configure set aws_access_key_id ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.CLOUDFLARE_R2_SECRET_ACCESS_KEY }}
aws configure set default.region auto

- name: Deploy manifests to R2
env:
R2_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com
R2_BUCKET: ${{ secrets.CLOUDFLARE_R2_MANIFESTS_BUCKET }}
run: |
echo "Deploying manifests to Cloudflare R2..."

for file in src/internal/manifest/data/*.json; do
filename=$(basename "$file")
echo "Uploading $filename..."
aws s3 cp "$file" "s3://${R2_BUCKET}/${filename}" \
--endpoint-url "${R2_ENDPOINT}" \
--content-type "application/json" \
--cache-control "public, max-age=300"
done

echo "Deployment complete!"

- name: Verify deployment
env:
R2_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com
R2_BUCKET: ${{ secrets.CLOUDFLARE_R2_MANIFESTS_BUCKET }}
run: |
echo "Verifying deployed files..."
aws s3 ls "s3://${R2_BUCKET}/" --endpoint-url "${R2_ENDPOINT}"
64 changes: 64 additions & 0 deletions .github/workflows/update-manifests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Update Manifests

on:
schedule:
# Run daily at 6 AM UTC
- cron: '0 6 * * *'
workflow_dispatch:
inputs:
runtime:
description: 'Runtime to update (node, python, ruby, all)'
required: false
default: 'all'
type: choice
options:
- all
- node
- python
- ruby

permissions:
contents: write
pull-requests: write

jobs:
update-manifests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'src/go.mod'

- name: Generate manifests
run: |
RUNTIME="${{ github.event.inputs.runtime || 'all' }}"
echo "Generating manifests for: $RUNTIME"
go run ./scripts/generate-manifests "$RUNTIME"

- name: Check for changes
id: check-changes
run: |
git diff --quiet src/internal/manifest/data/ || echo "changed=true" >> $GITHUB_OUTPUT

- name: Create Pull Request
if: steps.check-changes.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore(manifest): update runtime manifests'
title: 'chore(manifest): update runtime manifests'
body: |
Automated manifest update from upstream sources.

This PR was created by the [Update Manifests workflow](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}).

Please review the changes to ensure the URLs and checksums are correct.
branch: chore/update-manifests
delete-branch: true
labels: |
automated
manifest
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
"build:shim": "go build -v -ldflags=\"-s -w\" -o dist/dtvem-shim.exe ./src/cmd/shim",
"deploy:local": "npm run build && copy dist\\dtvem.exe %USERPROFILE%\\.dtvem\\bin\\dtvem.exe && copy dist\\dtvem-shim.exe %USERPROFILE%\\.dtvem\\bin\\dtvem-shim.exe && echo Deploy complete. Run 'dtvem reshim' manually to update shims.",
"clean": "rm -rf dist coverage.out coverage.html",
"check": "npm run format && npm run lint && npm run test"
"check": "npm run format && npm run lint && npm run test",
"manifest:node": "go run ./scripts/generate-manifests node",
"manifest:python": "go run ./scripts/generate-manifests python",
"manifest:ruby": "go run ./scripts/generate-manifests ruby",
"manifest:all": "go run ./scripts/generate-manifests all"
},
"devDependencies": {
"@commitlint/cli": "^19.0.0",
Expand Down
84 changes: 84 additions & 0 deletions schemas/manifest.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/dtvem/dtvem/main/schemas/manifest.schema.json",
"title": "dtvem Runtime Manifest",
"description": "Manifest file containing available versions and download URLs for a runtime",
"type": "object",
"required": ["version", "versions"],
"additionalProperties": false,
"properties": {
"version": {
"type": "integer",
"const": 1,
"description": "Manifest format version (currently 1)"
},
"versions": {
"type": "object",
"description": "Map of version strings to platform availability",
"additionalProperties": {
"$ref": "#/$defs/platformMap"
}
}
},
"$defs": {
"platformMap": {
"type": "object",
"description": "Map of platform keys to download info or null (unavailable)",
"propertyNames": {
"enum": [
"windows-amd64",
"windows-arm64",
"windows-386",
"darwin-amd64",
"darwin-arm64",
"linux-amd64",
"linux-arm64",
"linux-arm",
"linux-386"
]
},
"additionalProperties": {
"oneOf": [
{ "$ref": "#/$defs/download" },
{ "type": "null" }
]
}
},
"download": {
"type": "object",
"description": "Download information for a pre-built binary",
"required": ["url", "sha256"],
"additionalProperties": false,
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "Direct download URL for the binary archive"
},
"sha256": {
"type": "string",
"pattern": "^[a-fA-F0-9]{64}$",
"description": "SHA256 checksum (64 hex characters)"
}
}
}
},
"examples": [
{
"version": 1,
"versions": {
"3.13.1": {
"windows-amd64": {
"url": "https://www.python.org/ftp/python/3.13.1/python-3.13.1-embed-amd64.zip",
"sha256": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"
},
"darwin-arm64": null,
"linux-amd64": {
"url": "https://github.com/astral-sh/python-build-standalone/releases/download/20251209/cpython-3.13.1.tar.gz",
"sha256": "b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3"
}
}
}
}
]
}
Loading