Add support for custom request headers in commit generation #13
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Extension | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- main | |
jobs: | |
release: | |
# Only run if the PR was merged and has the "Release" label | |
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'Release') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch full history for version tagging | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run linting | |
run: npm run lint | |
- name: Build extension | |
run: npm run build | |
- name: Run tests | |
run: xvfb-run -a npm test | |
- name: Install vsce | |
run: npm install -g @vscode/vsce | |
- name: Get version from package.json | |
id: get-version | |
run: | | |
VERSION=$(node -p "require('./package.json').version") | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
echo "Extension version: $VERSION" | |
- name: Package extension | |
run: vsce package | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v2 | |
id: create-release | |
with: | |
tag_name: v${{ steps.get-version.outputs.version }} | |
name: Release v${{ steps.get-version.outputs.version }} | |
body: | | |
## Release v${{ steps.get-version.outputs.version }} | |
This release was automatically created from PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }} | |
### Changes | |
${{ github.event.pull_request.body }} | |
files: | | |
commitollama-${{ steps.get-version.outputs.version }}.vsix | |
draft: false | |
prerelease: false | |
- name: Publish to VS Code Marketplace | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
run: vsce publish --pat $VSCE_PAT |