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
18 changes: 18 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release Please

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
release-type: node
48 changes: 12 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
name: Release
name: Publish

on:
push:
tags:
- v*.*.*
release:
types: [published]
workflow_dispatch:

permissions:
contents: write

jobs:
release:
publish:
runs-on: ubuntu-latest

steps:
Expand All @@ -20,8 +19,8 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: npm
node-version: 'lts/*'
cache: 'npm'

- name: Install dependencies
run: npm ci
Expand All @@ -44,39 +43,16 @@ jobs:
name: vsix-package
path: '*.vsix'

- name: Get version from tag
id: get_version
if: startsWith(github.ref, 'refs/tags/')
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

- name: Extract changelog for version
id: changelog
if: startsWith(github.ref, 'refs/tags/')
run: |
VERSION=${GITHUB_REF#refs/tags/v}
# Extract changelog section for this version
sed -n "/## \[$VERSION\]/,/## \[/p" CHANGELOG.md | sed '$d' > release_notes.md
if [ ! -s release_notes.md ]; then
echo "No changelog found for version $VERSION"
echo "# Release $VERSION" > release_notes.md
echo "See CHANGELOG.md for details." >> release_notes.md
fi

- name: Create GitHub Release
- name: Upload vsix to Release
uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/')
if: github.event_name == 'release'
with:
allowUpdates: true
omitBody: true
omitName: true
artifacts: '*.vsix'
bodyFile: release_notes.md
draft: false
prerelease: false
name: 'Release ${{ steps.get_version.outputs.TAG }}'
tag: ${{ steps.get_version.outputs.TAG }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to VS Code Marketplace
if: startsWith(github.ref, 'refs/tags/')
if: github.event_name == 'release'
run: npx @vscode/vsce publish --packagePath *.vsix -p ${{ secrets.VSCE_PAT }}
7 changes: 1 addition & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Changelog

All notable changes to the "DDEV PHPStan" extension will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
All notable changes to this project will be documented in this file. This project uses [Release Please](https://github.com/googleapis/release-please) to automate releases and changelog management.

## [0.4.2] - 2025-10-01

Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.