Created CD pipeline
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Failing after 27s

This commit is contained in:
2026-09-09 16:27:00 +02:00
parent d3aaa8cd6f
commit a5e6a9c658
2 changed files with 70 additions and 2 deletions
@@ -2,7 +2,7 @@ on:
push:
branches:
- main
jobs:
publish:
name: Publish VS Code Extension
@@ -10,3 +10,71 @@ 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: '18'
- 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: |
cd dutchies-dcs-scripting-tools
npx vsce package -o ../dutchies-dcs-scripting-tools.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.vsix
env:
NODE_OPTIONS: '--experimental-fetch'
+1 -1
View File
@@ -19,7 +19,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/dutchie031/DcsMissionScriptingTools"
"url": "https://git.dutchie031.com/dutchie031/DcsMissionScriptingTools"
},
"categories": [
"Other"