Fix wrong "Changed" subtitle in 0.1.1 changelog #19
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: Build & publish | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*.*.*" | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
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: Build | |
run: npm i | |
- name: Lint | |
run: npm run lint | |
- 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: | |
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 }} |