Skip to content

Commit

Permalink
chore: add release command
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Feb 19, 2024
1 parent bc128fb commit 78cbd9f
Show file tree
Hide file tree
Showing 3 changed files with 394 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name: Build
name: Publish Package

on:
push:
tags:
- v*

permissions:
contents: write
id-token: write

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -14,13 +18,14 @@ jobs:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3

- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
node-version: 20
registry-url: https://registry.npmjs.org/
cache: pnpm

- run: pnpm install --frozen-lockfile
- run: pnpm install --frozen-lockfile --prefer-offline

- name: Publish to Open VSX Registry
id: publishToOpenVSX
Expand All @@ -35,3 +40,8 @@ jobs:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}

- name: Generate Changelog
run: npx changelogithub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
},
"scripts": {
"vscode:prepublish": "pnpm compile",
"release": "bumpp package.json --commit --push --tag && git update-ref refs/heads/release refs/heads/main && git push origin release",
"compile": "tsup ./src/extension.ts --external vscode --minify",
"watch": "tsup ./src/extension.ts --external vscode --watch --sourcemap",
"test": "vitest run --config vite.global-config.ts",
Expand All @@ -166,6 +167,8 @@
"@vitest/ws-client": "^1.3.0",
"@vue/reactivity": "^3.2.33",
"birpc": "^0.2.15",
"bumpp": "^9.3.0",
"changelogithub": "^0.13.3",
"eslint": "^8.56.0",
"flatted": "^3.2.9",
"fs-extra": "^10.0.1",
Expand Down
Loading

0 comments on commit 78cbd9f

Please sign in to comment.