Skip to content

7XL⚠️ ◾ Release v1.5.4 (#402) #6

7XL⚠️ ◾ Release v1.5.4 (#402)

7XL⚠️ ◾ Release v1.5.4 (#402) #6

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
---
name: Release – Phase 2
on:
push:
branches:
- main
paths:
- .github/workflows/support/release-trigger.txt
permissions: {}
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Install Node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 19.x
- name: npm – Install Dependencies
run: npm install
- name: npm – Build
run: npm run build:release
- name: Release – Install TFX CLI
run: npm install -g tfx-cli
working-directory: ${{ github.workspace }}/release
- name: Release – Create
run: npx tfx-cli extension create --manifest-globs vss-extension.json --output-path ../ms-omex.PRMetrics.vsix
working-directory: ${{ github.workspace }}/release
- name: Release – Publish
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: ms-omex.PRMetrics
path: ${{ github.workspace }}/ms-omex.PRMetrics.vsix
- name: Get Version
id: version
shell: pwsh
run: |-
$Version = Get-Content -Path '.github/workflows/support/release-trigger.txt'
Write-Output -InputObject "VERSION=v$Version" >> $Env:GITHUB_OUTPUT
- name: GitHub Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with:
discussion_category_name: Releases
files: ${{ github.workspace }}/ms-omex.PRMetrics.vsix
generate_release_notes: true
name: Release ${{ steps.version.outputs.VERSION }}
tag_name: ${{ steps.version.outputs.VERSION }}
# Fine-grained Personal Access Token (PAT) with the following permissions for microsoft/PR-Metrics:
# - Read access to Metadata
# - Read and Write access to Code (aka Contents) and Discussions
token: ${{ secrets.RELEASE_PHASE_2_GITHUB_RELEASE }}
- name: Publish Release
uses: HaaLeo/publish-vscode-extension@a7981039f3dd0bd407a71c10b11f3cb79cb249d4 # v1.3.0
with:
# Fine-grained Azure DevOps Personal Access Token (PAT) with the Manage access to Marketplace permission.
pat: ${{ secrets.RELEASE_PHASE_2_PUBLISH_RELEASE }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ github.workspace }}/ms-omex.PRMetrics.vsix
...