3.63.0 (#156) #33
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "*.*.*" | |
# Running from workflow dispatch (AKA manual) will not publish anything. | |
# This is intended for testing changes to this flow. | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18.15.x | |
cache: "npm" | |
cache-dependency-path: package-lock.json | |
- name: Get release version | |
# VSCode doesn't support pre release versions https://github.com/microsoft/vsmarketplace/issues/50#issuecomment-990764201 | |
run: | | |
echo "version=$(cat package.json | jq -r '.version')" >> $GITHUB_OUTPUT | |
id: version | |
# TypeScript set at 4.7.4 because @kubernetes/client-node 0.16.3 (and 0.17.0) breaks with version 4.8.2+ | |
- run: npm install -g vsce [email protected] esbuild | |
- run: mkdir -p /tmp/vscode-ext | |
- run: | | |
npm install | |
tsc && vsce package -o /tmp/vscode-ext | |
- name: Publish vscode-ext | |
if: github.event_name != 'workflow_dispatch' | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
run: vsce publish ${{ steps.version.outputs.version }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: vscode-ext | |
path: | | |
/tmp/vscode-ext | |
if-no-files-found: error | |
release_gh: | |
needs: [release] | |
runs-on: ubuntu-24.04 | |
if: github.event_name != 'workflow_dispatch' | |
permissions: | |
packages: write | |
contents: write | |
deployments: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
path: /tmp/artifacts | |
- uses: montudor/action-zip@v1 | |
- name: Prepare binaries for upload | |
run: | | |
mkdir /tmp/release | |
mv /tmp/artifacts/vscode-ext/* /tmp/release/ | |
# Consider to add changelog generation.. | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: /tmp/release/** | |
update_latest: | |
runs-on: ubuntu-24.04 | |
needs: release_gh | |
if: github.event_name != 'workflow_dispatch' | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
# Get complete history | |
fetch-depth: 0 | |
- name: Update major version and latest tags | |
uses: metalbear-co/release-tracker-action@main | |
env: | |
# GitHub token to enable pushing tags | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
# Move "latest" tag | |
update-latest: true | |
# Don't update the vX.Y tags | |
update-minor: false |