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
30 changes: 29 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
minor: ${{ steps.release.outputs.minor }}
patch: ${{ steps.release.outputs.patch }}
permissions:
contents: read
contents: write
steps:
- name: Generate GitHub App Token
id: app-token
Expand All @@ -96,6 +96,34 @@ jobs:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

# Bridge: GitHub does not create git tags for draft releases, but
# release-please needs the tag to anchor version calculations for
# subsequent release PRs. Without it, release-please scans the full
# commit history, may find an old breaking change, and proposes a
# wrong major bump. The force-tag-creation config option (release-please
# v17.2.0+) would handle this natively, but v4.4.0 of the action
# bundles v17.1.3. Remove this step once the action upgrades past
# v17.2.0. See: https://github.com/googleapis/release-please/pull/2423
- name: Create git tag for draft release
if: ${{ steps.release.outputs.release_created == 'true' }}
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
TAG="${{ steps.release.outputs.tag_name }}"
echo "Creating tag $TAG at ${{ github.sha }}"
if ! OUTPUT=$(gh api "repos/${{ github.repository }}/git/refs" \
--method POST \
-f ref="refs/tags/$TAG" \
-f sha="${{ github.sha }}" 2>&1); then
if echo "$OUTPUT" | grep -qi "Reference already exists"; then
echo "::warning::Tag $TAG already exists, skipping"
else
echo "::error::Failed to create tag $TAG"
echo "$OUTPUT" >&2
exit 1
fi
fi

extension-package-release:
name: Package VS Code Extensions (Release)
needs: [release-please]
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.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"markdownlint-cli2": "^0.20.0"
},
"overrides": {
"markdown-it": "14.1.1",
"undici": "7.18.2"
},
"repository": {
Expand Down
1 change: 1 addition & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"draft": true,
"release-search-depth": 800,
"commit-search-depth": 1000,
"force-tag-creation": true,
Expand Down
Loading