Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Commit 6c5c5ac

Browse files
authored
Merge pull request #60 from OpenForgeProject/release/v0.5.0
feat: update release management
2 parents 106c4c8 + 8e6eab9 commit 6c5c5ac

4 files changed

Lines changed: 34 additions & 45 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: googleapis/release-please-action@v4
17+
with:
18+
release-type: node

.github/workflows/release.yml

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
name: Release
1+
name: Publish
22

33
on:
4-
push:
5-
tags:
6-
- v*.*.*
4+
release:
5+
types: [published]
76
workflow_dispatch:
87

98
permissions:
109
contents: write
1110

1211
jobs:
13-
release:
12+
publish:
1413
runs-on: ubuntu-latest
1514

1615
steps:
@@ -20,8 +19,8 @@ jobs:
2019
- name: Setup Node.js
2120
uses: actions/setup-node@v6
2221
with:
23-
node-version: lts/*
24-
cache: npm
22+
node-version: 'lts/*'
23+
cache: 'npm'
2524

2625
- name: Install dependencies
2726
run: npm ci
@@ -44,39 +43,16 @@ jobs:
4443
name: vsix-package
4544
path: '*.vsix'
4645

47-
- name: Get version from tag
48-
id: get_version
49-
if: startsWith(github.ref, 'refs/tags/')
50-
run: |
51-
VERSION=${GITHUB_REF#refs/tags/v}
52-
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
53-
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
54-
55-
- name: Extract changelog for version
56-
id: changelog
57-
if: startsWith(github.ref, 'refs/tags/')
58-
run: |
59-
VERSION=${GITHUB_REF#refs/tags/v}
60-
# Extract changelog section for this version
61-
sed -n "/## \[$VERSION\]/,/## \[/p" CHANGELOG.md | sed '$d' > release_notes.md
62-
if [ ! -s release_notes.md ]; then
63-
echo "No changelog found for version $VERSION"
64-
echo "# Release $VERSION" > release_notes.md
65-
echo "See CHANGELOG.md for details." >> release_notes.md
66-
fi
67-
68-
- name: Create GitHub Release
46+
- name: Upload vsix to Release
6947
uses: ncipollo/release-action@v1
70-
if: startsWith(github.ref, 'refs/tags/')
48+
if: github.event_name == 'release'
7149
with:
50+
allowUpdates: true
51+
omitBody: true
52+
omitName: true
7253
artifacts: '*.vsix'
73-
bodyFile: release_notes.md
74-
draft: false
75-
prerelease: false
76-
name: 'Release ${{ steps.get_version.outputs.TAG }}'
77-
tag: ${{ steps.get_version.outputs.TAG }}
7854
token: ${{ secrets.GITHUB_TOKEN }}
7955

8056
- name: Publish to VS Code Marketplace
81-
if: startsWith(github.ref, 'refs/tags/')
57+
if: github.event_name == 'release'
8258
run: npx @vscode/vsce publish --packagePath *.vsix -p ${{ secrets.VSCE_PAT }}

CHANGELOG.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# Changelog
22

3-
All notable changes to the "DDEV PHPStan" extension will be documented in this file.
4-
5-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7-
8-
## [Unreleased]
3+
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.
94

105
## [0.4.2] - 2025-10-01
116

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)