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

32
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm semantic-release

27
.gitignore vendored Normal file
View File

@@ -0,0 +1,27 @@
# Node.js
node_modules/
# Logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# Environment
.env
.env*.local
# Editor directories and files
.vscode/
.idea/
*.sublime-project
*.sublime-workspace
# Build artifacts
dist/
build/
coverage/
# OS-specific files
.DS_Store
Thumbs.db

13
.releaserc.json Normal file
View File

@@ -0,0 +1,13 @@
{
"branches": ["master"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
["@semantic-release/git", {
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
"@semantic-release/github"
]
}

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

20
package.json Normal file
View File

@@ -0,0 +1,20 @@
{
"name": "setup-weld-action",
"version": "1.0.0",
"description": "GitHub Action to set up the Weld CLI",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"github",
"action",
"weld"
],
"author": "",
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"semantic-release": "^24.2.9"
}
}

2314
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff