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
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
* text=auto
*.ts text eol=lf
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.sh text eol=lf
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.vsix binary
11 changes: 11 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# GitHub Automation

This repository includes two GitHub Actions workflows:

- `workflows/ci.yml`: Runs build, test, package, and uploads the VSIX artifact.
- `workflows/release.yml`: Builds, tests, packages, optionally publishes to Azure DevOps Marketplace, and creates GitHub releases for version tags.

## Required Secrets

- `MARKETPLACE_PAT`: Azure DevOps Marketplace personal access token with publish scope.
- `PUBLISHER_ID`: Publisher identifier for marketplace publishing.
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches: [main, develop]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
build-test:
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- name: Checkout
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: |
package-lock.json
tasks/stackit-authenticate/package-lock.json

- name: Install root dependencies
run: npm ci

- name: Build
run: npm run build

- name: Test
run: npm test

- name: Package extension
run: npm run package

- name: Upload VSIX artifact
uses: actions/upload-artifact@v7
with:
name: stackit-extension-vsix
path: '*.vsix'
if-no-files-found: error
retention-days: 7
100 changes: 100 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 25

steps:
- name: Checkout
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: |
package-lock.json
tasks/stackit-authenticate/package-lock.json

- name: Install root dependencies
run: npm ci

- name: Build and test
run: |
npm run build
npm test

- name: Resolve release version from tag
id: version
run: |
RELEASE_VERSION="${GITHUB_REF_NAME#v}"

if [[ ! "$RELEASE_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Tag version '$RELEASE_VERSION' is not valid semver (X.Y.Z)."
exit 1
fi

echo "version=$RELEASE_VERSION" >> "$GITHUB_OUTPUT"

- name: Apply tag version to manifests
env:
RELEASE_VERSION: ${{ steps.version.outputs.version }}
run: |
echo "Applying release version ${RELEASE_VERSION}"

RELEASE_VERSION="$RELEASE_VERSION" node <<'NODE'
const fs = require('fs');

const version = process.env.RELEASE_VERSION;
const [major, minor, patch] = version.split('.').map(Number);

const extensionManifestPath = 'vss-extension.json';
const taskManifestPath = 'tasks/stackit-authenticate/task.json';

const extensionManifest = JSON.parse(fs.readFileSync(extensionManifestPath, 'utf8'));
extensionManifest.version = version;
fs.writeFileSync(extensionManifestPath, `${JSON.stringify(extensionManifest, null, 2)}\n`);

const taskManifest = JSON.parse(fs.readFileSync(taskManifestPath, 'utf8'));
taskManifest.version = {
Major: major,
Minor: minor,
Patch: patch
};
fs.writeFileSync(taskManifestPath, `${JSON.stringify(taskManifest, null, 2)}\n`);

console.log(`Applied release version ${version} to manifests.`);
NODE

- name: Package extension
run: |
npm run validate:extension
npx tfx extension create --manifest-globs vss-extension.json

- name: Resolve VSIX path
id: vsix
run: |
VSIX=$(ls -1 *.vsix | head -n 1)
echo "path=$VSIX" >> "$GITHUB_OUTPUT"

- name: Publish to Marketplace
if: startsWith(github.ref, 'refs/tags/v')
env:
MARKETPLACE_PAT: ${{ secrets.MARKETPLACE_PAT }}
run: npm run package:publish

- name: Create GitHub release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.vsix.outputs.path }}
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
node_modules/
dist/
*.js
*.js.map
*.d.ts
*.vsix
.DS_Store
.env
.env.local
coverage/
*.log
.vscode/
.idea/
*.swp
*.swo
*~
tasks/*/node_modules/
tasks/*/dist/
tasks/*/*.js
tasks/*/*.js.map
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2026-06-16

### Added
- Initial release of STACKIT Azure DevOps Service Connection Extension
- Service connection type for STACKIT authentication
- Support for Workload Identity Federation (WIF) authentication
- Support for Key Flow authentication



---

## Versioning

Versions are tracked as:
- `major.minor.patch` (e.g., `1.0.0`)
- Breaking changes increment major version
- New features increment minor version
- Bug fixes increment patch version

Both `vss-extension.json` and `tasks/stackit-authenticate/package.json` versions are kept in sync.


Loading