diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 966ce5a..1df8edd 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -20,14 +20,32 @@ jobs: run: | git config --global user.name 'GitHub Actions' git config --global user.email 'actions@github.com' + - name: Check Commit Message + id: check_commit + run: | + commit_message=$(git log -1 --pretty=%B) + if [[ "$commit_message" =~ ^chore\(release\):\ ([.0-9]+).* ]]; then + version="${BASH_REMATCH[1]}" + echo "is_release=true" >> $GITHUB_OUTPUT + echo "version=$version" >> $GITHUB_OUTPUT + else + echo "is_release=false" >> $GITHUB_OUTPUT + fi - uses: oven-sh/setup-bun@v2 - - run: bunx standard-version + - name: generate changelog and bump version + if: steps.check_commit.outputs.is_release == 'false' + run: bunx standard-version - name: Create Pull Request + if: steps.check_commit.outputs.is_release == 'false' uses: peter-evans/create-pull-request@v6 with: - commit-message: "chore(release): bump version" - title: "Bump Version" + title: "Pending Release" body: "Automated version bump using standard-version" branch: version-bump delete-branch: true - base: main \ No newline at end of file + base: main + - name: tag current package version and push + if: steps.check_commit.outputs.is_release == 'true' + run: | + git tag v${{ steps.check_commit.outputs.version }} + git push --tags diff --git a/CHANGELOG.md b/CHANGELOG.md index b815cec..7a52c38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [0.4.6](https://github.com/nix-community/vscode-nix-ide/compare/v0.4.5...v0.4.6) (2025-01-24) + ### [0.4.5](https://github.com/nix-community/vscode-nix-ide/compare/v0.4.3...v0.4.5) (2025-01-24) ### [0.4.4](https://github.com/nix-community/vscode-nix-ide/compare/v0.4.2...v0.4.4) (2025-01-24) diff --git a/package.json b/package.json index c4c974e..197c1ab 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "nix-ide", "displayName": "Nix IDE", "description": "Nix language support - syntax highlighting, formatting, and error reporting.", - "version": "0.4.5", + "version": "0.4.6", "publisher": "jnoortheen", "icon": "images/icon.png", "license": "MIT",