Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore(versioning): enhance GitHub Actions workflow to create releases #39

Merged
merged 1 commit into from
Dec 26, 2024
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
26 changes: 25 additions & 1 deletion .github/workflows/versioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,32 @@ jobs:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
PUB_CREDENTIALS: ${{ secrets.CREDENTIALS_JSON }}

- name: Create Git Tags
- name: Create Git Tags and Generate Changelog
id: release
run: |
# Run version command and capture new version
melos version --yes --no-git-tag-version --prerelease

# Generate the changelog
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
melos changelog >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV

# Get the version for the release title
VERSION=$(melos list --json | jq -r '.[0].version')
echo "VERSION=$VERSION" >> $GITHUB_ENV

# Create and push tag
melos exec -c 1 --no-private -- "git tag \$MELOS_PACKAGE_NAME-v\$MELOS_PACKAGE_VERSION"
git push origin --tags

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: tagflow-v${{ env.VERSION }} # set by previous step
name: Release v${{ env.VERSION }} # set by previous step
body: ${{ env.CHANGELOG }} # set by previous step
prerelease: true # Since these are dev releases
draft: false
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
Loading