Skip to content

Commit

Permalink
fix: release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
itszeeshan committed Aug 29, 2024
1 parent e915e26 commit 5e93038
Showing 1 changed file with 46 additions and 25 deletions.
71 changes: 46 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,49 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Install dependencies
run: npm install

- name: Build extension
run: npm run compile

- name: Bump version
run: |
npm version patch
git push origin HEAD
- name: Publish to VS Code Marketplace
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: |
npm install -g @vscode/vsce
vsce publish -p $VSCE_PAT
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Install dependencies
run: npm install

- name: Increment version
id: version
run: |
current_version=$(npm version patch)
echo "new_version=$current_version" >> $GITHUB_ENV
- name: Build the extension
run: npm run build

- name: Package the extension
run: |
npm run package
ls -lh *.vsix
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: '*.vsix'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to Visual Studio Marketplace
run: |
vsce publish
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}

- name: Commit and push version update
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add package.json
git commit -m "ci: bump version to ${{ env.new_version }}"
git tag ${{ env.new_version }}
git push origin main --tags

0 comments on commit 5e93038

Please sign in to comment.