Skip to content

2.0.2

2.0.2 #10

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
build-vsix:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install --prefix CommitRangeReleaseNotesTask
- name: Build project
run: npm run build-ci --prefix CommitRangeReleaseNotesTask
- name: Install tfx-cli
run: npm install -g tfx-cli
- name: Update version numbers from tag
run: |
VERSION="${{ github.event.release.tag_name }}"
MAJOR=$(echo $VERSION | cut -d. -f1)
MINOR=$(echo $VERSION | cut -d. -f2)
PATCH=$(echo $VERSION | cut -d. -f3)
jq --arg v "$VERSION" '.version = $v' vss-extension.json > tmp.$$.json && mv tmp.$$.json vss-extension.json
jq --argjson major $MAJOR --argjson minor $MINOR --argjson patch $PATCH \
'.version = {Major: $major, Minor: $minor, Patch: $patch}' \
CommitRangeReleaseNotesTask/task/task.json > tmp.$$.json && mv tmp.$$.json CommitRangeReleaseNotesTask/task/task.json
echo "Updated versions to $VERSION"
shell: bash
- name: Package Azure DevOps Extension
run: tfx extension create --manifest-globs vss-extension.json
- name: Upload VSIX artifact
uses: actions/upload-artifact@v4
with:
name: vsix-package
path: '*.vsix'
- name: Publish to Visual Studio Marketplace
run: tfx extension publish --vsix $(ls *.vsix) --token ${{ secrets.AZURE_DEVOPS_PAT }}