Skip to content

Commit

Permalink
- Added: Automatic detection of CI/CD system (GitHub Actions or GitLa…
Browse files Browse the repository at this point in the history
…b CI)

- Removed: Manual CI type selection from settings
- Improved: Error handling and user feedback for tag creation and pushing
- Fixed: Issue with tag creation and pushing synchronization
  • Loading branch information
danielchristianschroeter committed Oct 4, 2024
1 parent ec278d7 commit 2288711
Show file tree
Hide file tree
Showing 17 changed files with 1,893 additions and 588 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,14 @@ jobs:
./*.vsix
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}

- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.2.0]

- Added: Automatic detection of CI/CD system (GitHub Actions or GitLab CI)
- Removed: Manual CI type selection from settings
- Improved: Error handling and user feedback for tag creation and pushing
- Fixed: Issue with tag creation and pushing synchronization

## [1.1.0]

- Changed: Restructure and optimize code for better maintainability
Expand Down
49 changes: 44 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Git Tag Release Tracker

The **Git Tag Release Tracker** extension for Visual Studio Code allows you to manage and track your Git tags and releases directly within Visual Studio Code. Easily increment your Major, Minor, or Patch semantic versioning with a single click in the status bar.
The **Git Tag Release Tracker** extension for Visual Studio Code allows you to manage and track your Git tags and releases directly within Visual Studio Code. Easily increment your Major, Minor, or Patch semantic versioning with a single click in the status bar. This extension now supports both GitHub Actions and GitLab CI/CD pipelines with automatic detection.

## Features

- **Automatic Detection**: Automatically detects your Git repository, branch, and the latest tags.
- **Status Bar Integration**: Displays the number of unreleased commits and the latest tag version in the VS Code status bar.
- **Automatic Detection**: Automatically detects your Git repository, branch, the latest tags, and CI/CD system (GitHub Actions or GitLab CI).
- **Status Bar Integration**: Displays the number of unreleased commits, the latest tag version, and CI/CD status in the VS Code status bar.
- **Tag Management**: Provides buttons to create major, minor, and patch tags directly from the status bar.
- **Initial Tag Creation**: Easily create an initial version tag (1.0.0) if no tags are present.
- **Compare Commits**: Open a compare link to view changes between the latest tag and the current branch on GitHub/GitLab.
- **CI/CD Integration**: Ideal for CI/CD workflows triggered by tag pushes.
- **CI/CD Integration**: Shows the build status of the latest tag directly in the status bar for both GitHub Actions and GitLab CI/CD.

### Screenshots

Expand All @@ -31,12 +31,51 @@ The **Git Tag Release Tracker** extension for Visual Studio Code allows you to m
<em>Maintain existing prefixes and suffixes in the version tag structure.</em>
</p>

<p align="center">
<img src="images/status-bar-show-github-workflow-gitlab-pipeline-build-status.png" alt="Preserve Prefix and Suffix" width=80%>
<br/>
<em>Get current build status for Github Action Workflows or GitLab Pipelines.</em>
</p>

## Requirements

Ensure your current directory contains a Git repository with a configured remote (e.g., GitHub or GitLab).
- Ensure your current directory contains a Git repository with a configured remote (GitHub or GitLab).
- For CI/CD status checks:
- GitHub: A Personal Access Token with `repo:status` scope (or `repo` for private repositories).
- GitLab: A Personal Access Token with `read_api` scope.

## Extension Settings

This extension contributes the following settings:

- `gitTagReleaseTracker.defaultBranch`: Specifies the default branch used for release versioning (e.g., main, master, production). Default is `main`.
- `gitTagReleaseTracker.ciToken`: Your GitHub or GitLab Personal Access Token for CI/CD status checks.
- `gitTagReleaseTracker.ciApiUrl`: The API URL for your CI/CD service.
- For GitHub: `https://api.github.com`
- For GitLab: Your GitLab instance URL (e.g., `https://gitlab.com` for GitLab.com)

## Setting up CI/CD Status Checks

To enable CI/CD status checks for your tags:

1. Generate a Personal Access Token:

- For GitHub:
- Go to Settings > Developer settings > Personal access tokens > Generate new token.
- Select the `repo:status` scope (or `repo` for private repositories).
- For GitLab:
- Go to User Settings > Access Tokens.
- Create a new token with the `read_api` scope.

2. Open your VS Code settings (File > Preferences > Settings).

3. Search for "Git Tag Release Tracker" and fill in the following settings:

- `gitTagReleaseTracker.ciToken`: Paste your Personal Access Token here.
- `gitTagReleaseTracker.ciApiUrl`:
- For GitHub: Use `https://api.github.com`
- For GitLab: Enter your GitLab instance URL (e.g., `https://gitlab.com` for GitLab.com)

4. Save your settings.

The extension will automatically detect whether you're using GitHub Actions or GitLab CI based on your repository configuration. It will then check and display the CI/CD status for your tags in the status bar.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2288711

Please sign in to comment.