update: check only md files #2
Workflow file for this run
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 vscode extension | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| vscode: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| version: 10 | |
| run_install: false | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 23.11.0 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build extension | |
| run: pnpm run vscode:publish | |
| - run: | | |
| cd $GITHUB_WORKSPACE | |
| ls -al | |
| git fetch --all | |
| git fetch --tags | |
| git tag -l | |
| LATEST_TAG=`git tag --sort=refname |tail -n 2 |head -n 1` | |
| echo "LATEST_TAG: $LATEST_TAG" | |
| NEW_TAG=`git tag --sort=refname |tail -n 1` | |
| echo "NEW_TAG: $NEW_TAG" | |
| git log --format='%(trailers:key=Type,valueonly,separator=%x20)%x1c%s [%(trailers:key=Issue,valueonly,separator=,)]' $LATEST_TAG..$NEW_TAG | awk -F "\034" '{ | |
| gsub(/\[\]$/, "", $2); | |
| if (length($1) == 0) $1=""; | |
| if (!($1 in item_count)) item_count[$1]=0; | |
| items[$1, item_count[$1]]=$2; | |
| item_count[$1]++; | |
| } | |
| END { | |
| for (k in item_count) { | |
| print k; | |
| k2=k; | |
| gsub(/./, "-", k2); | |
| print k2 | |
| for (i=0; i<item_count[k]; i++) print "- "items[k, i]; | |
| print "" | |
| } | |
| }' > commit_notes | |
| echo "## Version Change Log $NEW_TAG" >> version.txt | |
| echo " " >> version.txt | |
| echo '```' >> version.txt | |
| cat commit_notes >> version.txt | |
| echo '```' >> version.txt | |
| - run: | | |
| cat > zshrc_helper << EOF | |
| weapon_vscode_launch_helper () { | |
| if [ -n "$PROJECT_FOLDER" ]; then | |
| if [ -f "$PROJECT_FOLDER/.vscode/.zshrc" ]; then | |
| source $PROJECT_FOLDER/.vscode/.zshrc | |
| fi | |
| fi | |
| } | |
| weapon_vscode_launch_helper | |
| EOF | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| body_path: ${{ github.workspace }}/version.txt | |
| files: | | |
| ${{ github.workspace }}/weaponized-0.0.1.vsix | |
| ${{ github.workspace }}/commit_notes | |
| ${{ github.workspace }}/zshrc_helper |