diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1458d0a..27a1a65 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,5 +18,22 @@ jobs: run: | npm ci npm run build + npx vsce package env: CI: true + - uses: cycjimmy/semantic-release-action@v2 + id: semantic + with: + extra_plugins: | + @semantic-release/changelog + @semantic-release/git + branch: main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Do something when a new release published + if: steps.semantic.outputs.new_release_published == 'true' + run: | + echo ver: ${{ steps.semantic.outputs.new_release_version }} + echo maj: ${{ steps.semantic.outputs.new_release_major_version }} + echo min: ${{ steps.semantic.outputs.new_release_minor_version }} + echo pat: ${{ steps.semantic.outputs.new_release_patch_version }} diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml deleted file mode 100644 index 0d68a4a..0000000 --- a/.github/workflows/semantic-release.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Semantic Release -on: - push: - branches: - - main -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: cycjimmy/semantic-release-action@v2 - with: - extra_plugins: | - @semantic-release/changelog - @semantic-release/git - branch: main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - diff --git a/.github/workflows/vsix-release.yml b/.github/workflows/vsix-release.yml deleted file mode 100644 index 1c91cc8..0000000 --- a/.github/workflows/vsix-release.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: CI -on: - release: - types: - - published -jobs: - release: - name: release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: actions/setup-node@v3 - with: - node-version: 16.x - cache: npm - - run: | - npm ci - npx vsce publish diff --git a/.releaserc b/.releaserc index 4273312..8a15efc 100644 --- a/.releaserc +++ b/.releaserc @@ -15,4 +15,8 @@ plugins: chore(release): ${nextRelease.version} ${nextRelease.notes} -- "@semantic-release/github" +- "@semantic-release/github": + assets: + - path: "**/*.vsix" + label: "Visual Studio Extension Package" + \ No newline at end of file