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
5 changes: 0 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
jobs:
ci:
runs-on: ${{ matrix.os }}
env:
#just hardcode this. It's not a mission-critical token, and we can always change it
COVERALLS_REPO_TOKEN: "Ysqq6q68DgojDzv3gvl5Yv029HXZYwGxq"
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand All @@ -23,6 +20,4 @@ jobs:
- run: npm run build
- run: npm run lint
- run: npm run test
# disable coverage for now (because coveralls is down right now)
#- run: npm run publish-coverage
- run: npm run create-package
File renamed without changes.
101 changes: 101 additions & 0 deletions .github/workflows/xelp_shadow_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Xelp Shadow Release

on:
workflow_dispatch:

jobs:
shadow-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout xelp/main
uses: actions/checkout@v4
with:
ref: xelp/main
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Calculate XelpShadow Version
id: version
run: |
CURRENT_VERSION=$(node -p "require('./package.json').version")
PACKAGE_NAME=$(node -p "require('./package.json').name")
echo "Current version: $CURRENT_VERSION"
echo "Package name: $PACKAGE_NAME"
echo "package_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT

# Remove pre-release and build metadata
BASE_VERSION=$(echo "$CURRENT_VERSION" | sed 's/[-+].*//')

# Split version into parts
IFS='.' read -r -a PARTS <<< "$BASE_VERSION"
if [ ${#PARTS[@]} -ne 3 ]; then
echo "Error: Version must be in MAJOR.MINOR.PATCH format"
exit 1
fi
MAJOR="${PARTS[0]}"
MINOR="${PARTS[1]}"
PATCH="${PARTS[2]}"

# Get build metadata
DATE=$(date +'%Y%m%d')
SHORT_HASH=$(git rev-parse --short HEAD)

# Construct base version: MAJOR.MINOR.DATE<PATCH>
CLEAN_VERSION="$MAJOR.$MINOR.$DATE$PATCH"

# Full version with metadata for the tag message/release notes
METADATA_VERSION="$CLEAN_VERSION+xelp-$SHORT_HASH"

# Use clean version for package.json and git tag (no + or -)
PACKAGE_VERSION="$CLEAN_VERSION"
TAG_VERSION="$CLEAN_VERSION"

echo "Clean version: $CLEAN_VERSION"
echo "Metadata version: $METADATA_VERSION"

echo "package_version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
echo "tag_version=$TAG_VERSION" >> $GITHUB_OUTPUT
echo "metadata_version=$METADATA_VERSION" >> $GITHUB_OUTPUT
- name: Install dependencies
run: npm ci

- name: Update package.json version
run: |
npm version ${{ steps.version.outputs.package_version }} --no-git-tag-version

- name: Create VSIX
run: npm run create-package

- name: Commit and Push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
git checkout -b xelp/dist
git add -f *.vsix package.json package-lock.json
git commit -m "Release shadow version ${{ steps.version.outputs.package_version }}"
git tag -a "${{ steps.version.outputs.tag_version }}" -m "Shadow release ${{ steps.version.outputs.metadata_version }}"
git push origin xelp/dist --force
git push origin "${{ steps.version.outputs.tag_version }}" --force

- name: Create Release
env:
GH_TOKEN: ${{ secrets.GH_PAT }}
run: |
gh release create "${{ steps.version.outputs.tag_version }}" \
--repo $GITHUB_REPOSITORY \
--title "Shadow Release ${{ steps.version.outputs.tag_version }}" \
--notes "Shadow release build ${{ steps.version.outputs.metadata_version }}" \
--prerelease \
*.vsix
19 changes: 9 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"multi-root-ready"
],
"engines": {
"vscode": "^1.81.0",
"node": "^12.12.0"
"vscode": "^1.81.0"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -58,8 +57,8 @@
"@vscode/extension-telemetry": "^0.4.7",
"array-sort": "^1.0.0",
"backoff": "^2.5.0",
"brighterscript": "^0.70.3",
"brighterscript-formatter": "^1.7.19",
"brighterscript": "https://github.com/plexinc/brighterscript.git#0.70.202511253",
"brighterscript-formatter": "https://github.com/plexinc/brighterscript-formatter.git#1.7.2025112720",
"clone-deep": "^4.0.1",
"debounce": "^1.2.0",
"dotenv": "^6.2.0",
Expand Down