Build and Publish VS Code Extension Package #2
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 VS Code Extension Package | |
on: | |
workflow_dispatch: | |
jobs: | |
build-vscode-extension-package: | |
name: Java Extensions | |
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.12.0/code-server-4.12.0-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: | | |
./code-server/bin/code-server --install-extension [email protected] | |
rm -f $HOME/.local/share/code-server/extensions/extensions.json | |
- 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:latest \ | |
-f $HOME/.local/share/code-server/extensions \ | |
--registry-username=${{github.actor}} \ | |
--registry-password=${{secrets.GHCR_TOKEN}} |