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
19 changes: 0 additions & 19 deletions .github/workflows/publish.yml

This file was deleted.

39 changes: 27 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
name: Release
name: Release and Publish

on:
push:
branches:
- main
- master
workflow_dispatch:

jobs:
release:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: bulk-ops-generator

publish:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
runs-on: ubuntu-latest
environment:
name: publish
url: https://marketplace.visualstudio.com/items?itemName=Vuong.bulk-ops-generator
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ needs.release-please.outputs.tag_name }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm install
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
- name: Package extension
run: npx vsce package --out bulk-ops-generator.vsix
- name: Publish to VSCode Marketplace
run: npx vsce publish -p ${{ secrets.VSCE_TOKEN }} --packagePath bulk-ops-generator.vsix
- name: Publish to Open VSX Marketplace (Placeholder)
run: echo "Publishing to Open VSX Marketplace is not yet implemented."
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ dist
packages

bulk-ops-generator-*.vsix
.DS_Store
.DS_Store
out/
30 changes: 30 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Releasing a New Version

This document outlines the process for releasing a new version of the Bulk Ops Generator.

## Creating a Release

1. **Trigger the Release Workflow:**
* Navigate to the "Actions" tab in the GitHub repository.
* Select the "Release and Publish" workflow from the list.
* Click the "Run workflow" button, and then click the green "Run workflow" button in the dropdown. This will trigger the `release-please` action.

2. **Review the Release Pull Request:**
* The `release-please` action will create a new pull request with a generated changelog and a new version number.
* Review the pull request to ensure the changelog is accurate and the version number is correct.
* If you need to change the version number, you can edit the title of the pull request. For example, to change a `patch` release to a `minor` release, change the version in the title from `1.2.4` to `1.3.0`.
* You can also edit the body of the pull request to amend the changelog.

3. **Merge the Pull Request:**
* Once you are satisfied with the release pull request, merge it into the `main` branch.

## Publishing the Extension

1. **Approve the Publish Job:**
* After the release pull request is merged, the `publish` job in the "Release and Publish" workflow will be triggered.
* This job requires manual approval. You will receive a notification to approve the job.
* Navigate to the workflow run for the release, and you will see a "Waiting for approval" status for the `publish` job.
* Click the "Review deployments" button and then "Approve and deploy" to publish the new version to the VSCode Marketplace.

2. **(Placeholder) Publish to Open VSX Marketplace:**
* The workflow includes a placeholder step for publishing to the Open VSX Marketplace. This step is not yet implemented and will be skipped.
Loading