Skip to content

Publish FpcToolKit

Publish FpcToolKit #15

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Publish FpcToolKit
# Controls when the workflow will run
on:
release:
types:
- published
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Install the dependencies
run: npm i
- name: Install vsce
run: npm i -g vsce
- name: Install esbuild
run: npm i -g esbuild
- name: Build with esbuild
run: esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node
#
# Package and Upload Extension
#
# NOTE:
# The "vscode:prepublish" script in package.json will be executed to compile the extension
# prior to packaging.
#
- name: Package Extension into .vsix file
id: asset
shell: bash
run: >
vsce package;
echo ::set-output name=vsix_path::$(ls *.vsix)
- name: Upload .vsix file to Github as release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.asset.outputs.vsix_path }}
asset_name: ${{ steps.asset.outputs.vsix_path }}
asset_content_type: application/zip
- name: Publish
run: vsce publish -p ${{ secrets.VSCE_PAT }}