Skip to content

Bump Tarantool annotations #57

Bump Tarantool annotations

Bump Tarantool annotations #57

Workflow file for this run

name: Build & publish
on:
push:
branches:
- main
tags:
- "*.*.*"
pull_request:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Spell Check Repo
uses: crate-ci/typos@master
- name: Setup node 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
build:
name: Build
runs-on: ubuntu-latest
needs: [lint]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
lfs: true
- name: Setup node 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install dependencies
run: npm ci
- name: Package
run: npx vsce package -o tarantool-vscode.vsix
- name: Upload
uses: actions/upload-artifact@v4
with:
name: tarantool-vscode
path: ${{ github.workspace }}/tarantool-vscode.vsix
publish:
name: Publish
runs-on: ubuntu-latest
needs: [build]
if: success() && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Publish
run: npx vsce publish --packagePath $(find tarantool-vscode* -iname "*.vsix")
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- id: release_vars
run: |
CHGLOG=CHANGELOG.md;
X=$(grep -n "^## \[[0-9]" $CHGLOG | cut -f1 -d: | head -1);
Y=$(grep -n "^## \[[0-9]" $CHGLOG | cut -f1 -d: | head -2 | tail -1);
awk -v x=$X -v y=$Y 'NR > x && NR < y' $CHGLOG > changelog-latest.md;
echo "artifact=$(find tarantool-vscode* -iname '*.vsix' | xargs)" >> "$GITHUB_OUTPUT"
- name: Draft release
uses: softprops/action-gh-release@v2
with:
body_path: changelog-latest.md
draft: true
files: ${{ steps.release_vars.outputs.artifact }}