chore: remove LSP and integrate features directly (#794) #92
This file contains hidden or 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: Stage | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**/*.md' | |
- .github/workflows/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'fabric8-analytics' | |
name: Build and publish early access package | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ssh-key: ${{ secrets.DEPLOY_KEY }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: 'https://npm.pkg.github.com' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create .npmrc | |
run: | | |
echo "@trustification:registry=https://npm.pkg.github.com" > ~/.npmrc | |
echo "@fabric8-analytics:registry=https://npm.pkg.github.com" >> ~/.npmrc | |
- name: Install @vscode/vsce | |
run: npm i -g @vscode/vsce | |
- name: Install Dependencies | |
run: npm ci | |
- name: Get latest EA version | |
id: ea_version | |
run: | | |
# Get the current version from package.json | |
base_version=$(node -p "require('./package.json').version") | |
# Get the latest EA version for this base version | |
latest_ea=$(npm view @fabric8-analytics/fabric8-analytics-vscode-extension versions --json | grep -o "\"$base_version-ea\.[0-9]*\"" | sort -V | tail -n 1) | |
if [ -z "$latest_ea" ]; then | |
# If no EA version exists, start with .1 | |
ea_number=1 | |
else | |
# Extract the number and increment | |
ea_number=$(echo $latest_ea | grep -o "[0-9]*" | tail -n 1) | |
ea_number=$((ea_number + 1)) | |
fi | |
# Create the new EA version | |
ea_version="v${base_version}-ea.${ea_number}" | |
echo "version=$ea_version" >> "$GITHUB_OUTPUT" | |
- name: Update package with EA version | |
run: | | |
npm version ${{ steps.ea_version.outputs.version }} --no-git-tag-version --allow-same-version | |
- name: Compile for test | |
run: npm run test-compile | |
- name: VSCE package | |
run: | | |
vsce package --out fabric8-analytics-${{ steps.ea_version.outputs.version }}.vsix | |
- name: Create SHA256 checksum | |
run: | | |
sha256sum fabric8-analytics-${{ steps.ea_version.outputs.version }}.vsix > fabric8-analytics-${{ steps.ea_version.outputs.version }}.vsix.sha256 | |
- name: Upload vsix package and checksum | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vsix | |
path: | | |
./fabric8-analytics-${{ steps.ea_version.outputs.version }}.vsix | |
./fabric8-analytics-${{ steps.ea_version.outputs.version }}.vsix.sha256 | |
- name: Output artifact download URL | |
run: | | |
echo "::notice::Download the early access package from: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
echo "::notice::Package version: ${{ steps.ea_version.outputs.version }}" |