From ffd063c3e296ef238d568ca3f37b7886bb51dc33 Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Thu, 16 Jan 2025 10:13:00 +0000 Subject: [PATCH] GH Actions fixes and add Dependabot config --- .github/bin/check-package-version.js | 2 +- .github/dependabot.yml | 8 ++++++++ .github/workflows/deploy.yml | 14 +++++--------- 3 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/bin/check-package-version.js b/.github/bin/check-package-version.js index bfba3c1..f47a582 100644 --- a/.github/bin/check-package-version.js +++ b/.github/bin/check-package-version.js @@ -56,6 +56,6 @@ function getReleaseVersion() { function setFailed(err) { err = err instanceof Error ? err.toString() : err; - console.log(err); + console.log(`::error::${err}`); process.exitCode = 1; } diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a331422 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + labels: + - 'dependencies' diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 697ddd1..d877e9b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,29 +11,25 @@ jobs: steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true - name: Setup Node.js environment - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: - node-version: 14 + node-version: 'lts/*' - name: Check release version matches package.json run: node ./.github/bin/check-package-version ${{ github.ref }} - - name: Install vsce - run: npm install -g vsce - - name: Publish to VSCode Marketplace env: PAT: ${{ secrets.MARKETPLACE_PAT }} - run: vsce publish -p "$PAT" + run: npx @vscode/vsce publish -p "$PAT" - name: Delete tag on failure if: failure() run: | git push origin :${{ github.ref }} - echo "The GitHub release has been relegated to a draft and can be republished when the problems are fixed" - + echo "::error::The GitHub release has been relegated to a draft and can be republished when the problems are fixed"