Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

.github/workflows/publish.yaml #91

.github/workflows/publish.yaml

.github/workflows/publish.yaml #91

Workflow file for this run

name: Publish package
permissions:
contents: write
on:
schedule:
- cron: "0 8 * * *"
workflow_dispatch:
inputs:
EXTENSION_TAG:
description: "branch/tag of the extension to build."
type: string
default: main
jobs:
updates-check:
runs-on: ubuntu-latest
outputs:
repo-cache-hit: ${{ steps.cache-last-commit.outputs.cache-hit }}
steps:
- uses: actions/checkout@v4
- run: |
git rev-parse HEAD >> ./HEAD
- name: Check New Changes
id: cache-last-commit
uses: actions/cache@v4
with:
path: HEAD
key: HEAD-${{ hashFiles('HEAD') }}
publish-packages:
runs-on: ubuntu-latest
needs: updates-check
if: ${{ needs.updates-check.outputs.repo-cache-hit != 'true' || github.event_name != 'schedule' }}
steps:
- name: Checkout Extension
uses: actions/checkout@v4
with:
ref: ${{ github.events.inputs.EXTENSION_TAG }}
fetch-depth: 0
filter: blob:none
- name: Set Up NodeJS
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Check Out Continue as Git Submodule
run: git submodule update --init --recursive
- name: Install Dependencies
run: npm run install-dependencies
- name: Tag Pre-release
run: |
git config --global user.email "workflow@granitecode.ai"
git config --global user.name "Automated Workflow"
npm run tag-prerelease
npm version $(git describe --tags --abbrev=0) --no-git-tag-version --allow-same-version
- name: Build Extension
run: |
(cd continue/packages/config-yaml && npm run build)
npm run build
- name: Create Packages
run: |
npm run create-darwin-arm64-package
npm run create-linux-x64-package
npm run create-win32-x64-package
- name: Publish Packages to VS Code Marketplace
run: |
npx @vscode/vsce publish -p ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} --pre-release -i build/*darwin-arm64*.vsix
npx @vscode/vsce publish -p ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} --pre-release -i build/*linux-x64*.vsix
npx @vscode/vsce publish -p ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} --pre-release -i build/*win32-x64*.vsix
- name: Publish Packages to OpenVSX Registry
run: |
npx ovsx publish -p ${{ secrets.OVSX_MARKETPLACE_TOKEN }} --pre-release -i build/*darwin-arm64*.vsix
npx ovsx publish -p ${{ secrets.OVSX_MARKETPLACE_TOKEN }} --pre-release -i build/*linux-x64*.vsix
npx ovsx publish -p ${{ secrets.OVSX_MARKETPLACE_TOKEN }} --pre-release -i build/*win32-x64*.vsix
- name: Push Pre-release
run: git push origin --tags