Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(ci): add changelog to nightly builds #324

Merged
merged 2 commits into from
Feb 22, 2025
Merged
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
35 changes: 33 additions & 2 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for changelog generation

- name: Enable Corepack
run: corepack enable
Expand All @@ -37,6 +39,26 @@ jobs:
- name: Package Extension
run: yarn package

- name: Generate Changelog
id: changelog
run: |
# Get the latest 0.x.0 release tag
LAST_MAJOR=$(git tag -l "v0.*" | grep -E "v0\.[0-9]+\.0$" | sort -V | tail -n1)
if [ -z "$LAST_MAJOR" ]; then
# If no major release found, use all commits
LAST_MAJOR=$(git rev-list --max-parents=0 HEAD)
fi

# Generate changelog from commits
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
echo "## What's Changed (since $LAST_MAJOR)" >> $GITHUB_ENV
echo "" >> $GITHUB_ENV
git log "$LAST_MAJOR..HEAD" --pretty=format:"* %s (%h)" >> $GITHUB_ENV
echo "" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Language Server Archive
run: |
VERSION=$(node -p "require('./package.json').version")
Expand All @@ -50,15 +72,24 @@ jobs:
run: |
VERSION=$(node -p "require('./package.json').version")

# Delete both release and tag
gh release delete nightly --yes || true
git push origin :refs/tags/nightly || true # Delete remote tag
git tag -d nightly || true # Delete local tag

# Create new release with tag
gh release create nightly \
--title "Nightly Build v${VERSION}" \
--notes "🌙 This is an automated nightly build from the master branch.

## VS Code Extension
${{ env.CHANGELOG }}

## Installation

### VS Code Extension
- Download the .vsix file and install it through VS Code

## Other Editors
### Other Editors
- Download tact-language-server-v${VERSION}.tar.gz (Linux/macOS) or tact-language-server-v${VERSION}.zip (Windows)
- Extract it to a convenient location
- Configure your editor to use the language server from the extracted folder" \
Expand Down