Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

github actions: set vscode extension to current in marketplace #52

Merged
merged 1 commit into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install -g vsce
- run: npm ci
- name: Set package version to latest
run: bash extension-version.sh
- run: npm run build --if-present
- run: npm run test
- run: npm install -g vsce
- run: vsce publish patch
12 changes: 12 additions & 0 deletions extension-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

info=$(vsce show MuleSoftInc.aml-vscode)
regex="(Version:)(.*)"
if [[ $info =~ Version:[[:blank:]]+([[:digit:]]+.[[:digit:]]+.[[:digit:]]+) ]]
then
version="${BASH_REMATCH[1]}"
echo "${version}" # concatenate strings
npm --no-git-tag-version --allow-same-version version $version
else
echo "$info doesn't match" >&2 # this could get noisy if there are a lot of non-matching files
fi