Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Commit

Permalink
create tag-build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maninder-singh-1 authored Jun 29, 2022
1 parent a573ebe commit 7601235
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions workflows/tag-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This is a basic workflow to help you get started with Actions

name: TAG_BUILD

# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
version:
description: 'Define tag'
required: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
create_tag:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
token: ${{secrets.WORKFLOW}}
- uses: rickstaa/action-create-tag@v1
with:
tag: ${{ github.event.inputs.version }}
message: "Release ${{ github.event.inputs.version }}"
- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag # The step ID to refer to later.
with:
semver_only: true
- run: |
echo "This branch is at version ${{ steps.get-latest-tag.outputs.tag }}"
git config --local user.email "[email protected]"
git config --local user.name "github-actions[bot]"
git checkout -b release/${{ steps.get-latest-tag.outputs.tag }} ${{ steps.get-latest-tag.outputs.tag }}
git push origin release/${{ steps.get-latest-tag.outputs.tag }}
# - uses: actions/checkout@v2
- name: Create Pull Request
uses: repo-sync/pull-request@v2
with:
source_branch: release/${{ steps.get-latest-tag.outputs.tag }} # If blank, default: triggered branch
destination_branch: "master" # If blank, default: master
pr_title: "Pulling ${{ github.ref }} into master" # Title of pull request
pr_body: ":crown: *An automated PR*" # Full markdown support, requires pr_title to be set
pr_label: "auto-pr" # Comma-separated list (no spaces)
pr_draft: false # Creates pull request as draft
pr_allow_empty: true # Creates pull request even if there are no changes
github_token: ${{ secrets.WORKFLOW }}

0 comments on commit 7601235

Please sign in to comment.