Skip to content

A simple yet powerful PowerShell script that automates the entire process of creating a new release on GitHub for any project.

License

Notifications You must be signed in to change notification settings

King4s/Universal-PowerShell-Publisher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Universal PowerShell Release Publisher

A simple yet powerful PowerShell script that automates the entire process of creating a new release on GitHub for any project.

PowerShell License: MIT

This tool is designed for developers who want a standardized, interactive, and reliable way to publish new versions of their software without manual steps on the GitHub website.

Features

  • Stateful & Intelligent: Remembers your project's name and latest version in a local publish.config.json file.
  • Smart Versioning: Automatically suggests the next patch version number (e.g., suggests 1.0.1 if the last release was 1.0.0).
  • Interactive: Guides the user through the release process, asking for a version number, commit message, and release notes.
  • Automatic Archiving: Creates a clean .zip archive of your project, automatically excluding Git files, build scripts, and other unnecessary artifacts.
  • Full Automation: Handles all Git commands (add, commit, tag, push) and GitHub CLI commands (gh release create, gh release upload) for you.
  • Easy Reset: To start over or re-configure the project name, simply delete the publish.config.json file.

Prerequisites

  1. Git: Must be installed and available in your system's PATH. Download Git.
  2. GitHub CLI: Must be installed and authenticated.
    • Download GitHub CLI.
    • After installing, run gh auth login in your terminal to connect to your GitHub account.

How to Use

  1. Clone Your Project: Make sure you are working inside a Git repository that has been cloned from GitHub.
    git clone <your-repository-url>
    cd <your-repository-name>
  2. Place the Script: Copy the Publish.ps1 script into the root directory of your cloned repository.
  3. Run the Script: Open a PowerShell terminal in your repository's root directory and run the script.
    .\Publish.ps1
  4. Follow the Prompts:
    • The first time you run it, it will ask for a Project Name. This is used for naming the release .zip file.
    • It will then suggest a version number. You can press Enter to accept it or type a different one.
    • Provide a commit message and release notes when prompted.

The script will handle the rest, leaving you with a new, formal release on your GitHub page.

Resetting Configuration

If you need to change the project name or reset the versioning for any reason, simply delete the publish.config.json file from your project's root directory. The script will re-initialize on its next run as if it were the first time.

About

A simple yet powerful PowerShell script that automates the entire process of creating a new release on GitHub for any project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published