mirror of
https://github.com/gravitl/netmaker.git
synced 2024-09-21 07:46:04 +08:00
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
# creates new branch (release_{{ version }} with tag {{ version }} from develop
|
|
# will fail if branch or tag already exists on github
|
|
name: Create Release Branch
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
version:
|
|
required: true
|
|
type: string
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: "netmaker version"
|
|
required: true
|
|
jobs:
|
|
release-branch:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout develop
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: develop
|
|
- name: setup go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.19
|
|
- name: setup git
|
|
run: |
|
|
git config user.name "Github Actions"
|
|
git config user.emaail "info@netmaker.io"
|
|
- name: create release Branch
|
|
run: |
|
|
git switch -c release_${{ github.event.inputs.version }}
|
|
git tag -f ${{ github.event.inputs.version }}
|
|
#push branch
|
|
git push origin release_${{ github.event.inputs.version }}
|
|
#push tag
|
|
git push origin ${{ github.event.inputs.version }}
|
|
|