mirror of
				https://github.com/ButlerLogic/action-autotag.git
				synced 2025-10-31 07:16:25 +07:00 
			
		
		
		
	Create regex.md
This commit is contained in:
		
							
								
								
									
										30
									
								
								examples/regex.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								examples/regex.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,30 @@ | ||||
| # Regex Strategy | ||||
|  | ||||
| The regex strategy uses the pattern identified at `regex_pattern` on the file identified by `root` to determine the version. | ||||
|  | ||||
| **.gorc** | ||||
| ```sh | ||||
| version: 1.1.0 | ||||
| ``` | ||||
|  | ||||
| **.github/workflows/example.yml** | ||||
| ```yaml | ||||
| name: Release New Version | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - master | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|     - uses: actions/checkout@v2 | ||||
|     - uses: butlerlogic/action-autotag@stable | ||||
|       with: | ||||
|         regex_pattern: "/(?:version:)(?:\\s)?(\\d+\\.\\d+\\d+.+)\\n?/" | ||||
|         root: ./.gorc | ||||
|         tag_prefix: "v" | ||||
|         GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||||
| ``` | ||||
		Reference in New Issue
	
	Block a user
	 Corey Butler
					Corey Butler