Compare commits

..
16 Commits
Author SHA1 Message Date
dutchie031 7a59237d45 changed build strategy
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Successful in 53s
2026-09-09 16:59:21 +02:00
dutchie031 67c1c197b0 updated package versions
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Failing after 43s
2026-09-09 16:51:41 +02:00
dutchie031 54f6f3258f updated package versions
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Failing after 36s
2026-09-09 16:50:05 +02:00
dutchie031 7b03863d29 updated package versions
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Failing after 41s
2026-09-09 16:48:30 +02:00
dutchie031 c7dd5ca0f0 updated package versions
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Failing after 45s
2026-09-09 16:46:39 +02:00
dutchie031 e94ba970dd updated package versions
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Failing after 50s
2026-09-09 16:44:05 +02:00
dutchie031 e8728caa9b updated package versions
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Failing after 34s
2026-09-09 16:29:13 +02:00
dutchie031 a5e6a9c658 Created CD pipeline
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Failing after 27s
2026-09-09 16:27:00 +02:00
dutchie031 d3aaa8cd6f updated dev script
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Successful in 26s
2026-08-15 16:41:30 +02:00
dutchie031 ed48c4d2de updated dev script
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Successful in 29s
2026-08-15 16:38:06 +02:00
dutchie031 5860f34166 updated scripting tools
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Successful in 5s
Publish GitHub Action / Verify action (push) Successful in 22s
Publish GitHub Action / Derive release metadata (push) Successful in 4s
Publish GitHub Action / Publish tags (push) Successful in 6s
2026-07-26 17:42:03 +02:00
dutchie031 c3a605a448 trying out entire action
Publish GitHub Action / Verify action (push) Successful in 1m9s
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Successful in 1m9s
Publish GitHub Action / Derive release metadata (push) Successful in 3s
Publish GitHub Action / Publish tags (push) Successful in 11s
2026-07-24 23:21:28 +02:00
dutchie031 b5f0c323a6 trying out entire action 2026-07-24 23:20:33 +02:00
dutchie031 5fb181d136 trying out entire action
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Successful in 5s
Publish GitHub Action / Verify action (push) Failing after 5s
Publish GitHub Action / Derive release metadata (push) Skipped
Publish GitHub Action / Publish tags (push) Skipped
2026-07-24 21:54:39 +02:00
dutchie031 aad02ccd79 trying out entire action
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Successful in 3s
2026-07-24 21:53:38 +02:00
dutchie031 d60788c90f trying out entire action 2026-07-24 21:53:20 +02:00
6 changed files with 1003 additions and 355 deletions
+147 -172
View File
@@ -4,16 +4,15 @@ on:
push: push:
branches: branches:
- main - main
# paths: paths:
# - github-action/package.json - github-action/package.json
permissions: permissions:
contents: write contents: write
jobs: jobs:
verify_action:
test: name: Verify action
name: Test action
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
@@ -32,194 +31,170 @@ jobs:
working-directory: github-action working-directory: github-action
run: npm ci run: npm ci
- name: Run action tests - name: Create verification fixture
working-directory: github-action shell: bash
run: npm test run: |
mkdir -p test-action-input
cat <<'EOF' > test-action-input/main.lua
local message = {}
# verify_action: message.hello = function()
# name: Verify action return "hello"
# runs-on: linux end
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Set up Node.js return message
# uses: actions/setup-node@v4 EOF
# with:
# node-version: 22
# cache: npm
# cache-dependency-path: github-action/package-lock.json
# - name: Install action dependencies - name: Run action locally
# working-directory: github-action uses: ./github-action
# run: npm ci with:
source-root: test-action-input
output-file: test-action-output/compiled.lua
# - name: Create verification fixture - name: Assert compiled output exists
# shell: bash shell: bash
# run: | run: test -f test-action-output/compiled.lua
# mkdir -p test-action-input
# cat <<'EOF' > test-action-input/main.lua
# local message = {}
# message.hello = function() derive_release:
# return "hello" name: Derive release metadata
# end runs-on: ubuntu-latest
needs: verify_action
outputs:
version: ${{ steps.derive.outputs.version }}
release_tag: ${{ steps.derive.outputs.release_tag }}
rolling_minor_tag: ${{ steps.derive.outputs.rolling_minor_tag }}
rolling_major_tag: ${{ steps.derive.outputs.rolling_major_tag }}
bump_kind: ${{ steps.derive.outputs.bump_kind }}
should_publish: ${{ steps.derive.outputs.should_publish }}
latest_release_tag: ${{ steps.derive.outputs.latest_release_tag }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
# return message - name: Derive version and tags
# EOF id: derive
shell: bash
run: |
set -euo pipefail
# - name: Run action locally version=$(node -p "require('./github-action/package.json').version")
# uses: ./github-action if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# with: echo "github-action/package.json version must be semver X.Y.Z, got: $version" >&2
# source-root: test-action-input exit 1
# output-file: test-action-output/compiled.lua fi
# - name: Assert compiled output exists IFS='.' read -r major minor patch <<< "$version"
# shell: bash release_tag="action/v${version}"
# run: test -f test-action-output/compiled.lua rolling_minor_tag="action/v${major}.${minor}"
rolling_major_tag="action/v${major}"
# derive_release: latest_release_tag=$(git tag --list 'action/v*.*.*' --sort=-version:refname | head -n 1)
# name: Derive release metadata
# runs-on: linux
# needs: verify_action
# outputs:
# version: ${{ steps.derive.outputs.version }}
# release_tag: ${{ steps.derive.outputs.release_tag }}
# rolling_minor_tag: ${{ steps.derive.outputs.rolling_minor_tag }}
# rolling_major_tag: ${{ steps.derive.outputs.rolling_major_tag }}
# bump_kind: ${{ steps.derive.outputs.bump_kind }}
# should_publish: ${{ steps.derive.outputs.should_publish }}
# latest_release_tag: ${{ steps.derive.outputs.latest_release_tag }}
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Derive version and tags bump_kind="initial"
# id: derive should_publish="true"
# shell: bash
# run: |
# set -euo pipefail
# version=$(node -p "require('./github-action/package.json').version") if [[ -n "$latest_release_tag" ]]; then
# if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then latest_version=${latest_release_tag#action/v}
# echo "github-action/package.json version must be semver X.Y.Z, got: $version" >&2
# exit 1
# fi
# IFS='.' read -r major minor patch <<< "$version" if [[ "$version" == "$latest_version" ]]; then
# release_tag="action/v${version}" should_publish="false"
# rolling_minor_tag="action/v${major}.${minor}" bump_kind="duplicate"
# rolling_major_tag="action/v${major}" else
IFS='.' read -r latest_major latest_minor latest_patch <<< "$latest_version"
# latest_release_tag=$(git tag --list 'action/v*.*.*' --sort=-version:refname | head -n 1) if (( major < latest_major )) || \
(( major == latest_major && minor < latest_minor )) || \
(( major == latest_major && minor == latest_minor && patch < latest_patch )); then
echo "github-action/package.json version $version must be greater than latest published $latest_version" >&2
exit 1
fi
# bump_kind="initial" if (( major > latest_major )); then
# should_publish="true" bump_kind="major"
elif (( minor > latest_minor )); then
bump_kind="minor"
elif (( patch > latest_patch )); then
bump_kind="patch"
else
echo "Unable to derive release kind from $latest_version -> $version" >&2
exit 1
fi
fi
fi
# if [[ -n "$latest_release_tag" ]]; then echo "version=$version" >> "$GITHUB_OUTPUT"
# latest_version=${latest_release_tag#action/v} echo "release_tag=$release_tag" >> "$GITHUB_OUTPUT"
echo "rolling_minor_tag=$rolling_minor_tag" >> "$GITHUB_OUTPUT"
echo "rolling_major_tag=$rolling_major_tag" >> "$GITHUB_OUTPUT"
echo "bump_kind=$bump_kind" >> "$GITHUB_OUTPUT"
echo "should_publish=$should_publish" >> "$GITHUB_OUTPUT"
echo "latest_release_tag=$latest_release_tag" >> "$GITHUB_OUTPUT"
# if [[ "$version" == "$latest_version" ]]; then - name: Summarize release plan
# should_publish="false" shell: bash
# bump_kind="duplicate" run: |
# else {
# IFS='.' read -r latest_major latest_minor latest_patch <<< "$latest_version" echo "## Action release plan"
echo ""
echo "- Version: ${{ steps.derive.outputs.version }}"
echo "- Release tag: ${{ steps.derive.outputs.release_tag }}"
echo "- Rolling minor tag: ${{ steps.derive.outputs.rolling_minor_tag }}"
echo "- Rolling major tag: ${{ steps.derive.outputs.rolling_major_tag }}"
echo "- Bump kind: ${{ steps.derive.outputs.bump_kind }}"
echo "- Latest published tag: ${{ steps.derive.outputs.latest_release_tag || 'none' }}"
echo "- Will publish: ${{ steps.derive.outputs.should_publish }}"
} >> "$GITHUB_STEP_SUMMARY"
# if (( major < latest_major )) || \ publish_tags:
# (( major == latest_major && minor < latest_minor )) || \ name: Publish tags
# (( major == latest_major && minor == latest_minor && patch < latest_patch )); then runs-on: ubuntu-latest
# echo "github-action/package.json version $version must be greater than latest published $latest_version" >&2 needs: derive_release
# exit 1 if: ${{ needs.derive_release.outputs.should_publish == 'true' }}
# fi steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
# if (( major > latest_major )); then - name: Create immutable release tag
# bump_kind="major" shell: bash
# elif (( minor > latest_minor )); then run: |
# bump_kind="minor" set -euo pipefail
# elif (( patch > latest_patch )); then release_tag='${{ needs.derive_release.outputs.release_tag }}'
# bump_kind="patch"
# else
# echo "Unable to derive release kind from $latest_version -> $version" >&2
# exit 1
# fi
# fi
# fi
# echo "version=$version" >> "$GITHUB_OUTPUT" if git rev-parse "$release_tag" >/dev/null 2>&1; then
# echo "release_tag=$release_tag" >> "$GITHUB_OUTPUT" echo "Release tag $release_tag already exists" >&2
# echo "rolling_minor_tag=$rolling_minor_tag" >> "$GITHUB_OUTPUT" exit 1
# echo "rolling_major_tag=$rolling_major_tag" >> "$GITHUB_OUTPUT" fi
# echo "bump_kind=$bump_kind" >> "$GITHUB_OUTPUT"
# echo "should_publish=$should_publish" >> "$GITHUB_OUTPUT"
# echo "latest_release_tag=$latest_release_tag" >> "$GITHUB_OUTPUT"
# - name: Summarize release plan git tag "$release_tag" "$GITHUB_SHA"
# shell: bash
# run: |
# {
# echo "## Action release plan"
# echo ""
# echo "- Version: ${{ steps.derive.outputs.version }}"
# echo "- Release tag: ${{ steps.derive.outputs.release_tag }}"
# echo "- Rolling minor tag: ${{ steps.derive.outputs.rolling_minor_tag }}"
# echo "- Rolling major tag: ${{ steps.derive.outputs.rolling_major_tag }}"
# echo "- Bump kind: ${{ steps.derive.outputs.bump_kind }}"
# echo "- Latest published tag: ${{ steps.derive.outputs.latest_release_tag || 'none' }}"
# echo "- Will publish: ${{ steps.derive.outputs.should_publish }}"
# } >> "$GITHUB_STEP_SUMMARY"
# publish_tags: - name: Update rolling tags
# name: Publish tags shell: bash
# runs-on: linux run: |
# needs: derive_release set -euo pipefail
# if: ${{ needs.derive_release.outputs.should_publish == 'true' }} git tag -f '${{ needs.derive_release.outputs.rolling_minor_tag }}' "$GITHUB_SHA"
# steps: git tag -f '${{ needs.derive_release.outputs.rolling_major_tag }}' "$GITHUB_SHA"
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Create immutable release tag - name: Push release tags
# shell: bash shell: bash
# run: | run: |
# set -euo pipefail set -euo pipefail
# release_tag='${{ needs.derive_release.outputs.release_tag }}' git push origin '${{ needs.derive_release.outputs.release_tag }}'
git push origin '${{ needs.derive_release.outputs.rolling_minor_tag }}' --force
git push origin '${{ needs.derive_release.outputs.rolling_major_tag }}' --force
# if git rev-parse "$release_tag" >/dev/null 2>&1; then - name: Summarize published tags
# echo "Release tag $release_tag already exists" >&2 shell: bash
# exit 1 run: |
# fi {
echo "## Published action tags"
# git tag "$release_tag" "$GITHUB_SHA" echo ""
echo "- Immutable: ${{ needs.derive_release.outputs.release_tag }}"
# - name: Update rolling tags echo "- Rolling minor: ${{ needs.derive_release.outputs.rolling_minor_tag }}"
# shell: bash echo "- Rolling major: ${{ needs.derive_release.outputs.rolling_major_tag }}"
# run: | echo "- Bump kind: ${{ needs.derive_release.outputs.bump_kind }}"
# set -euo pipefail } >> "$GITHUB_STEP_SUMMARY"
# git tag -f '${{ needs.derive_release.outputs.rolling_minor_tag }}' "$GITHUB_SHA"
# git tag -f '${{ needs.derive_release.outputs.rolling_major_tag }}' "$GITHUB_SHA"
# - name: Push release tags
# shell: bash
# run: |
# set -euo pipefail
# git push origin '${{ needs.derive_release.outputs.release_tag }}'
# git push origin '${{ needs.derive_release.outputs.rolling_minor_tag }}' --force
# git push origin '${{ needs.derive_release.outputs.rolling_major_tag }}' --force
# - name: Summarize published tags
# shell: bash
# run: |
# {
# echo "## Published action tags"
# echo ""
# echo "- Immutable: ${{ needs.derive_release.outputs.release_tag }}"
# echo "- Rolling minor: ${{ needs.derive_release.outputs.rolling_minor_tag }}"
# echo "- Rolling major: ${{ needs.derive_release.outputs.rolling_major_tag }}"
# echo "- Bump kind: ${{ needs.derive_release.outputs.bump_kind }}"
# } >> "$GITHUB_STEP_SUMMARY"
@@ -2,7 +2,7 @@ on:
push: push:
branches: branches:
- main - main
jobs: jobs:
publish: publish:
name: Publish VS Code Extension name: Publish VS Code Extension
@@ -10,3 +10,75 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version from package.json
id: version
run: |
VERSION=$(jq -r '.version' dutchies-dcs-scripting-tools/package.json)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
- name: Check if tag exists
id: tag_check
run: |
if git show-ref --verify --quiet "refs/tags/v${{ steps.version.outputs.version }}"; then
echo "tag_exists=true" >> $GITHUB_OUTPUT
echo "Tag v${{ steps.version.outputs.version }} already exists"
else
echo "tag_exists=false" >> $GITHUB_OUTPUT
echo "Tag v${{ steps.version.outputs.version }} does not exist"
fi
- name: Exit if tag exists
if: steps.tag_check.outputs.tag_exists == 'true'
run: |
echo "Tag already exists, exiting."
exit 1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: |
cd dutchies-dcs-scripting-tools
npm install
- name: Build extension
run: |
cd dutchies-dcs-scripting-tools
npm run compile
- name: Package extension
if: steps.tag_check.outputs.tag_exists == 'false'
run: |
npm install
cd dutchies-dcs-scripting-tools
npm install
npm run package
npx @vscode/vsce package --no-dependencies
mv dutchies-dcs-scripting-tools-${{ steps.version.outputs.version }}.vsix ../dutchies-dcs-scripting-tools-${{ steps.version.outputs.version }}.vsix
- name: Create tag and release
if: steps.tag_check.outputs.tag_exists == 'false'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag "v${{ steps.version.outputs.version }}"
git push origin "v${{ steps.version.outputs.version }}"
- name: Upload release assets
if: steps.tag_check.outputs.tag_exists == 'false'
uses: akkuman/gitea-release-action@v1
with:
tag_name: v${{ steps.version.outputs.version }}
name: Release v${{ steps.version.outputs.version }}
body: "VS Code Extension Release"
draft: false
files: |-
dutchies-dcs-scripting-tools-${{ steps.version.outputs.version }}.vsix
env:
NODE_OPTIONS: '--experimental-fetch'
+1 -1
View File
@@ -412,7 +412,7 @@ class Writer {
`-- This script can be referenced in DCS. Compiled script will then be loaded dynamically.`, `-- This script can be referenced in DCS. Compiled script will then be loaded dynamically.`,
`-- This way you can test the compiled output without having to re-import the script into the mission every time.`, `-- This way you can test the compiled output without having to re-import the script into the mission every time.`,
`-- This file will only have to be re-imported when the name or location of the compiled script file changes.`, `-- This file will only have to be re-imported when the name or location of the compiled script file changes.`,
`assert(loadfile("${actualFileLocation}"))()` `assert(loadfile([[${actualFileLocation}]]))()`
]; ];
fs.writeFileSync(devFileLocation, devLines.join('\n'), 'utf-8'); fs.writeFileSync(devFileLocation, devLines.join('\n'), 'utf-8');
this.logger.info(`Development script written to ${devFileLocation}`); this.logger.info(`Development script written to ${devFileLocation}`);
+12 -12
View File
@@ -2,7 +2,7 @@
"name": "dutchies-dcs-scripting-tools", "name": "dutchies-dcs-scripting-tools",
"displayName": "Dutchies Dcs Scripting Tools", "displayName": "Dutchies Dcs Scripting Tools",
"description": "Scripting tools to create DCS script and frameworks easier", "description": "Scripting tools to create DCS script and frameworks easier",
"version": "0.0.3", "version": "0.0.5",
"author": { "author": {
"name": "dutchie031", "name": "dutchie031",
"email": "54616262+dutchie031@users.noreply.github.com" "email": "54616262+dutchie031@users.noreply.github.com"
@@ -15,11 +15,11 @@
"publisher": "dutchie031", "publisher": "dutchie031",
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"vscode": "^1.108.1" "vscode": "1.108.1"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/dutchie031/DcsMissionScriptingTools" "url": "https://git.dutchie031.com/dutchie031/DcsMissionScriptingTools"
}, },
"categories": [ "categories": [
"Other" "Other"
@@ -124,15 +124,15 @@
"test": "vscode-test" "test": "vscode-test"
}, },
"devDependencies": { "devDependencies": {
"@types/vscode": "^1.108.1", "@types/vscode": "1.108.1",
"@types/mocha": "^10.0.10", "@types/mocha": "10.0.10",
"@types/node": "22.x", "@types/node": "26.4.1",
"typescript-eslint": "^8.52.0", "typescript-eslint": "8.70.0",
"eslint": "^9.39.2", "eslint": "10.9.1",
"esbuild": "^0.27.2", "esbuild": "0.27.7",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"typescript": "^5.9.3", "typescript": "5.9.3",
"@vscode/test-cli": "^0.0.12", "@vscode/test-cli": "0.0.15",
"@vscode/test-electron": "^2.5.2" "@vscode/test-electron": "2.5.2"
} }
} }
+2
View File
@@ -16,3 +16,5 @@
"esbuild": "^0.27.2" "esbuild": "^0.27.2"
} }
} }
+768 -169
View File
File diff suppressed because it is too large Load Diff