-
Notifications
You must be signed in to change notification settings - Fork 7
39 lines (34 loc) · 1.02 KB
/
complete-release.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
37
38
39
name: Complete Release
on:
pull_request:
types:
- closed
branches:
- master
jobs:
tag-and-release:
# Run only after release PR branch is merged
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'develop')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get Tag Name
id: get_tag_name
run: echo "tag_name=v$(cat pubspec.yaml | yq -r '.version')" >> $GITHUB_OUTPUT
- name: Create Tag
id: create_tag
uses: rickstaa/action-create-tag@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.get_tag_name.outputs.tag_name }}
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_tag_name.outputs.tag_name }}
name: ${{ steps.get_tag_name.outputs.tag_name }}
draft: true
prerelease: false
body_path: .scripts/changes.md