mirror of
				https://github.com/dw-0/kiauh.git
				synced 2025-10-31 09:25:49 +01:00 
			
		
		
		
	feat(ci): add automated release workflow for fast-forward and tagging
Adds a new GitHub Actions workflow that: - Fast-forwards master branch from develop - Creates and pushes a new release tag - Requires manual trigger with tag name input Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
		
							
								
								
									
										28
									
								
								.github/workflows/fast-forward.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								.github/workflows/fast-forward.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,28 +0,0 @@ | |||||||
| name: fast-forward |  | ||||||
| on: |  | ||||||
|   issue_comment: |  | ||||||
|     types: [ created, edited ] |  | ||||||
| jobs: |  | ||||||
|   fast-forward: |  | ||||||
|     # Only run if the comment contains the /fast-forward command. |  | ||||||
|     if: | |  | ||||||
|       contains(github.event.comment.body, '/fast-forward') && |  | ||||||
|       github.event.issue.pull_request && |  | ||||||
|       github.base_ref == 'develop' |  | ||||||
|     runs-on: ubuntu-latest |  | ||||||
|  |  | ||||||
|     permissions: |  | ||||||
|       contents: write |  | ||||||
|       pull-requests: write |  | ||||||
|       issues: write |  | ||||||
|  |  | ||||||
|     steps: |  | ||||||
|       - name: Fast forwarding |  | ||||||
|         uses: sequoia-pgp/fast-forward@v1 |  | ||||||
|         with: |  | ||||||
|           merge: true |  | ||||||
|           # To reduce the workflow's verbosity, use 'on-error' |  | ||||||
|           # to only post a comment when an error occurs, or 'never' to |  | ||||||
|           # never post a comment.  (In all cases the information is |  | ||||||
|           # still available in the step's summary.) |  | ||||||
|           comment: on-error |  | ||||||
							
								
								
									
										27
									
								
								.github/workflows/pull-request.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										27
									
								
								.github/workflows/pull-request.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,27 +0,0 @@ | |||||||
| name: pull-request |  | ||||||
| on: |  | ||||||
|   pull_request: |  | ||||||
|     branches: |  | ||||||
|       - develop |  | ||||||
|     types: [ opened, reopened, synchronize ] |  | ||||||
| jobs: |  | ||||||
|   check-fast-forward: |  | ||||||
|     runs-on: ubuntu-latest |  | ||||||
|  |  | ||||||
|     permissions: |  | ||||||
|       contents: read |  | ||||||
|       # We appear to need write permission for both pull-requests and |  | ||||||
|       # issues in order to post a comment to a pull request. |  | ||||||
|       pull-requests: write |  | ||||||
|       issues: write |  | ||||||
|  |  | ||||||
|     steps: |  | ||||||
|       - name: Checking if fast forwarding is possible |  | ||||||
|         uses: sequoia-pgp/fast-forward@v1 |  | ||||||
|         with: |  | ||||||
|           merge: false |  | ||||||
|           # To reduce the workflow's verbosity, use 'on-error' |  | ||||||
|           # to only post a comment when an error occurs, or 'never' to |  | ||||||
|           # never post a comment.  (In all cases the information is |  | ||||||
|           # still available in the step's summary.) |  | ||||||
|           comment: on-error |  | ||||||
							
								
								
									
										33
									
								
								.github/workflows/release-ff-and-tag.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								.github/workflows/release-ff-and-tag.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | |||||||
|  | name: Release - Fast-Forward and Tag | ||||||
|  | on: | ||||||
|  |   workflow_dispatch: | ||||||
|  |     inputs: | ||||||
|  |       tag_name: | ||||||
|  |         description: 'Provide a tag name (e.g. v1.0.0)' | ||||||
|  |         required: true | ||||||
|  |         type: string | ||||||
|  |  | ||||||
|  | jobs: | ||||||
|  |   ff-and-tag: | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     permissions: | ||||||
|  |       contents: write | ||||||
|  |     steps: | ||||||
|  |       - name: Checkout | ||||||
|  |         uses: actions/checkout@v4 | ||||||
|  |         with: | ||||||
|  |           fetch-depth: 0 | ||||||
|  |           ref: 'master' | ||||||
|  |       - name: Merge Fast Forward | ||||||
|  |         uses: MaximeHeckel/github-action-merge-fast-forward@v1.1.0 | ||||||
|  |         with: | ||||||
|  |           branchtomerge: origin/develop | ||||||
|  |           branch: master | ||||||
|  |         env: | ||||||
|  |           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||
|  |       - name: Create and Push Tag | ||||||
|  |         run: | | ||||||
|  |           git tag ${{ inputs.tag_name }} | ||||||
|  |           git push origin ${{ inputs.tag_name }} | ||||||
|  |         env: | ||||||
|  |           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||
		Reference in New Issue
	
	Block a user