tagger

command module
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 3 Imported by: 0

README ¶

Tagger 0.8

Creating a new release using the labels from the Pull Requests

🚀 How to use

Add a one of major, minor or path label to your PR and merge it.

  • Major - reset minor and patch
  • Minor - reset patch

Examples

Just add patch label to PR:

With default settings you will get release: v0.0.1

Add patch and I have latest tag v0.4.10

Result: release with tag and name v0.4.11

Add Minor and I have latest tag v0.4.10

Result: release with tag and name v0.5.0

Add Major and I have latest tag v0.4.10

Result: release with tag and name v1.0.0

First run
Labels

There are 3 labels will be created or updated (comply with semver):

  • Major
  • Minor
  • Patch
Tags

If your repository does not contain any tags, the next one after the default_tag will be created:

Default: v0.0.0 -> first tag v0.0.1

inputs
  • github-token - GitHub Token. Default ${{ github.token }}
  • pr-number - GitHub Token. Default ${{ github.event.number }}
  • default-tag - GitHub Token. Default 0.0.0
  • prefix - Tag prefix. Default v
Add new GitHub Action Workflow file:
name: 'Release'

on:
  pull_request:
    types: [closed]

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: flaticols/tagger@v1.0.0
Override inputs:
name: 'Release'

on:
  pull_request:
    types: [closed]

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          github-token: 'My token'
          pr-number: 10
          default-tag: '0.1.0'
          prefix: "ver"
      - uses: flaticols/tagger@v1.0.0
Run locally
go run . create -o flaticols -r tagger -t $(gh auth token)
Use as package (with cobra only)
package main

import C "github.com/flaticols/tagger/commands"

func main() {
	root := cobra.Command{}

	root.AddCommand(C.CreateCommand())

	_, err := root.ExecuteC()
	if err != nil {
		return
	}
}

Documentation ¶

The Go Gopher

There is no documentation for this package.

Directories ¶

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL