Created CD pipeline
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Failing after 27s
publish-vs-code-extensions.yml / Publish VS Code Extension (push) Failing after 27s
This commit is contained in:
@@ -10,3 +10,71 @@ 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: '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'
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/dutchie031/DcsMissionScriptingTools"
|
"url": "https://git.dutchie031.com/dutchie031/DcsMissionScriptingTools"
|
||||||
},
|
},
|
||||||
"categories": [
|
"categories": [
|
||||||
"Other"
|
"Other"
|
||||||
|
|||||||
Reference in New Issue
Block a user