Build and Publish 2.4.0 VS Code Extension Overlay #1
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: Build and Publish 2.4.0 VS Code Extension Overlay | |
on: | |
workflow_dispatch: | |
jobs: | |
build-vscode-extension-overlay-package: | |
name: Build VS Code Extension Overlay | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v3 | |
- name: Install Carvel tools | |
shell: bash | |
run: curl -L https://carvel.dev/install.sh | bash | |
- name: Install code-server | |
shell: bash | |
run: | | |
curl --fail -L -o code-server.tar.gz https://github.com/coder/code-server/releases/download/v4.21.1/code-server-4.21.1-linux-amd64.tar.gz | |
mkdir code-server | |
tar -C code-server --strip-components 1 -xvf code-server.tar.gz | |
- name: Install VS Code extensions | |
shell: bash | |
run: | | |
# install the Tanzu Developer Tools extension | |
export TANZU_DEV_TOOLS_VERSION="1.4.0" | |
curl -o vmware.tanzu-dev-tools.vsix "https://vmware.gallery.vsassets.io/_apis/public/gallery/publisher/vmware/extension/tanzu-dev-tools/${TANZU_DEV_TOOLS_VERSION}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage" | |
./code-server --install-extension vmware.tanzu-dev-tools.vsix | |
rm vmware.tanzu-dev-tools.vsix | |
export TANZU_ACCELERATOR_VERSION="1.0.4" | |
# install the Tanzu App Accelerator extension | |
curl -o vmware.tanzu-app-accelerator.vsix "https://vmware.gallery.vsassets.io/_apis/public/gallery/publisher/vmware/extension/tanzu-app-accelerator/${TANZU_ACCELERATOR_VERSION}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage" | |
./code-server --install-extension vmware.tanzu-app-accelerator.vsix | |
rm vmware.tanzu-app-accelerator.vsix | |
- name: Publish VS Code extensions as files | |
shell: bash | |
run: | | |
REPOSITORY_OWNER=${{github.repository_owner}} | |
imgpkg push \ | |
-i ghcr.io/${REPOSITORY_OWNER,,}/vscode-java-extensions-files:2.4.0 \ | |
-f $HOME/.local/share/code-server/extensions \ | |
--registry-username=${{github.actor}} \ | |
--registry-password=${{secrets.GITHUB_TOKEN}} | |
- name: Publish VS Code extensions as tarball | |
shell: bash | |
run: | | |
REPOSITORY_OWNER=${{github.repository_owner}} | |
mkdir /tmp/files | |
cd $HOME/.local/share/code-server/extensions | |
tar cvfz /tmp/files/extensions.tar.gz . | |
imgpkg push \ | |
-i ghcr.io/${REPOSITORY_OWNER,,}/vscode-java-extensions-tar:2.4.0 \ | |
-f /tmp/files \ | |
--registry-username=${{github.actor}} \ | |
--registry-password=${{secrets.GITHUB_TOKEN}} |