-
Notifications
You must be signed in to change notification settings - Fork 235
36 lines (34 loc) · 1.01 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
on:
release:
types: [published]
name: Merge Release Branch
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Format Branch Name
id: format
env:
GITHUB_REF: ${{ github.ref }} # This will be the tag; i.e. ref/tags/v1.1.1
run: |
git fetch --tags
echo ::set-output name=branch_name::"release/$(echo "${GITHUB_REF}" | cut -d/ -f3-)"
- name: Fetch main
run: |
git fetch origin
git checkout ${{ steps.format.outputs.branch_name }}
git checkout main
- name: Merge release branch
run: |
git config user.name github-actions
git config user.email [email protected]
git merge ${{ steps.format.outputs.branch_name }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}