Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nagarjunsanji authored Sep 16, 2024
1 parent eb1464b commit 9b981e9
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Get latest tag
run: |
latest-tag=$(git describe --tags --abbrev=0)
echo "Latest tag: $latest-tag"
echo "LATEST_TAG=$latest-tag" >> $GITHUB_ENV
- name: Set up Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -20,14 +26,15 @@ jobs:
npm ci
npm install -g vsce
- name: Replace sentry_dns with SENTRY_URL from secrets
- name: Update version in package.json
run: |
sed -i "s#https://[email protected]/20#${{ secrets.SENTRY_URL }}#g" ./src/constants/organization.ts
jq --arg version "$LATEST_TAG" '.version = $version' package.json > package.tmp.json
mv package.tmp.json package.json
shell: bash

- name: Verify updated organization.ts
run: cat ./src/constants/organization.ts
- name: Verify updated package.json
run: cat package.json

- name: Package VS Code Extension
run: vsce package

Expand All @@ -36,13 +43,8 @@ jobs:
with:
name: vsce-package
path: "*.vsix"

# - name: Publish to VS Code Marketplace
# env:
# VSCE_PAT: ${{ secrets.VSCE_PAT }}
# run: vsce publish -p $VSCE_PAT
- name: Trigger Sentry Release
uses: ./.github/workflows/sentry-release.yml
with:
github_token: ${{ secrets.GITHUB_TOKEN }}


0 comments on commit 9b981e9

Please sign in to comment.