feat: initial setup of github action and semantic release

This commit is contained in:
2025-12-16 20:16:35 +03:00
commit 717c267d0e
6 changed files with 2459 additions and 0 deletions

53
action.yml Normal file
View File

@@ -0,0 +1,53 @@
name: 'Setup Weld CLI'
description: 'Downloads a specific version of the weld CLI from a GitHub release, makes it executable, and adds it to the PATH.'
inputs:
weld-version:
description: 'The version of weld to install (e.g., v0.2.0). Defaults to the latest release.'
required: false
default: 'latest' # Use 'latest' as a special keyword
repo:
description: 'The repository where the weld CLI is released, in owner/repo format.'
required: false
default: Xenox-Incorporated-Industries/weld
github-token:
description: 'GitHub token for downloading from a private repository. The default token is usually sufficient within the same organization.'
required: false
default: ${{ github.token }}
branding:
icon: 'anchor'
color: 'blue'
runs:
using: "composite"
steps:
- name: Get Version Tag for Download
id: get_version
shell: bash
run: |
VERSION_TAG=""
if [[ "${{ inputs.weld-version }}" != "latest" ]]; then
VERSION_TAG="${{ inputs.weld-version }}"
fi
echo "tag=${VERSION_TAG}" >> $GITHUB_OUTPUT
- name: Download Weld CLI
shell: bash
env:
GH_TOKEN: ${{ inputs.github-token }}
run: |
echo "Downloading weld version '${{ inputs.weld-version }}' from repo '${{ inputs.repo }}'..."
gh release download ${{ steps.get_version.outputs.tag }} \
--repo ${{ inputs.repo }} \
--pattern 'weld-binary-*' \
--output ./weld
echo "Download complete."
- name: Make Weld CLI executable
shell: bash
run: chmod +x ./weld
- name: Add Weld CLI to PATH
shell: bash
run: echo "$(pwd)" >> $GITHUB_PATH