Skip to content

3.57.0 (#103)

3.57.0 (#103) #22

Workflow file for this run

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-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 17
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@v3
with:
name: vscode-ext
path: |
/tmp/vscode-ext
if-no-files-found: error
release_gh:
needs: [release]
runs-on: ubuntu-latest
if: github.event_name != 'workflow_dispatch'
permissions:
packages: write
contents: write
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
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-latest
needs: release_gh
if: github.event_name != 'workflow_dispatch'
steps:
- name: Check out code
uses: actions/checkout@v3
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