Compare commits
13
Commits
5fb181d136
..
v0.0.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a59237d45 | ||
|
|
67c1c197b0 | ||
|
|
54f6f3258f | ||
|
|
7b03863d29 | ||
|
|
c7dd5ca0f0 | ||
|
|
e94ba970dd | ||
|
|
e8728caa9b | ||
|
|
a5e6a9c658 | ||
|
|
d3aaa8cd6f | ||
|
|
ed48c4d2de | ||
|
|
5860f34166 | ||
|
|
c3a605a448 | ||
|
|
b5f0c323a6 |
@@ -13,7 +13,7 @@ permissions:
|
||||
jobs:
|
||||
verify_action:
|
||||
name: Verify action
|
||||
runs-on: linux_amd64
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
|
||||
derive_release:
|
||||
name: Derive release metadata
|
||||
runs-on: linux_amd64
|
||||
runs-on: ubuntu-latest
|
||||
needs: verify_action
|
||||
outputs:
|
||||
version: ${{ steps.derive.outputs.version }}
|
||||
@@ -149,7 +149,7 @@ jobs:
|
||||
|
||||
publish_tags:
|
||||
name: Publish tags
|
||||
runs-on: linux_amd64
|
||||
runs-on: ubuntu-latest
|
||||
needs: derive_release
|
||||
if: ${{ needs.derive_release.outputs.should_publish == 'true' }}
|
||||
steps:
|
||||
|
||||
@@ -2,7 +2,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish VS Code Extension
|
||||
@@ -10,3 +10,75 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
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'
|
||||
|
||||
@@ -412,7 +412,7 @@ class Writer {
|
||||
`-- 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 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');
|
||||
this.logger.info(`Development script written to ${devFileLocation}`);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "dutchies-dcs-scripting-tools",
|
||||
"displayName": "Dutchies Dcs Scripting Tools",
|
||||
"description": "Scripting tools to create DCS script and frameworks easier",
|
||||
"version": "0.0.3",
|
||||
"version": "0.0.5",
|
||||
"author": {
|
||||
"name": "dutchie031",
|
||||
"email": "54616262+dutchie031@users.noreply.github.com"
|
||||
@@ -15,11 +15,11 @@
|
||||
"publisher": "dutchie031",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"vscode": "^1.108.1"
|
||||
"vscode": "1.108.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/dutchie031/DcsMissionScriptingTools"
|
||||
"url": "https://git.dutchie031.com/dutchie031/DcsMissionScriptingTools"
|
||||
},
|
||||
"categories": [
|
||||
"Other"
|
||||
@@ -124,15 +124,15 @@
|
||||
"test": "vscode-test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/vscode": "^1.108.1",
|
||||
"@types/mocha": "^10.0.10",
|
||||
"@types/node": "22.x",
|
||||
"typescript-eslint": "^8.52.0",
|
||||
"eslint": "^9.39.2",
|
||||
"esbuild": "^0.27.2",
|
||||
"@types/vscode": "1.108.1",
|
||||
"@types/mocha": "10.0.10",
|
||||
"@types/node": "26.4.1",
|
||||
"typescript-eslint": "8.70.0",
|
||||
"eslint": "10.9.1",
|
||||
"esbuild": "0.27.7",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"typescript": "^5.9.3",
|
||||
"@vscode/test-cli": "^0.0.12",
|
||||
"@vscode/test-electron": "^2.5.2"
|
||||
"typescript": "5.9.3",
|
||||
"@vscode/test-cli": "0.0.15",
|
||||
"@vscode/test-electron": "2.5.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,3 +17,4 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Generated
+768
-169
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user