Skip to content
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
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
- run: npm ci
- run: npm run compile

- name: Run tests
run: xvfb-run npm test

- name: Package VSIX
run: npm run package

Expand Down Expand Up @@ -55,3 +58,24 @@ jobs:

- name: Publish to VS Code Marketplace
run: npx @vscode/vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ./privatemode-vscode.vsix

bump-version:
runs-on: ubuntu-latest
needs: [publish]
permissions:
contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: main

- name: Bump minor version on main
run: ./scripts/bump-minor-version.sh

- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add package.json
git commit -m "chore: bump version to $(jq -r .version package.json) for next release"
git push
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "git",
"url": "https://github.com/edgelesssys/privatemode-vscode"
},
"version": "0.1.2",
"version": "0.2.0",
"preview": true,
"engines": {
"vscode": "^1.116.0"
Expand Down
12 changes: 12 additions & 0 deletions scripts/bump-minor-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail

PACKAGE_JSON="${1:-package.json}"

CURRENT=$(jq -r .version "$PACKAGE_JSON")
IFS='.' read -r MAJOR MINOR _ <<< "$CURRENT"
NEXT="${MAJOR}.$((MINOR + 1)).0"

jq --tab --arg v "$NEXT" '.version = $v' "$PACKAGE_JSON" > tmp.$$.json && mv tmp.$$.json "$PACKAGE_JSON"

echo "Bumped version: ${CURRENT} -> ${NEXT}"