-
Notifications
You must be signed in to change notification settings - Fork 388
45 lines (42 loc) · 1.42 KB
/
release_special_version.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
40
41
42
43
44
45
name: Tag the special version 🚀
on:
pull_request:
types:
- closed
jobs:
release_special_if_merged:
if: ${{ github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'ci:ready_release_special') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.ref }}
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install release-it
run: |
npm install -g release-it
npm install -g release-it/bumper
npm install -g release-it/conventional-changelog
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: |
PUBSPEC_VERSION=$(grep 'version: ' pubspec.yaml | sed -e 's,.*: \(.*\),\1,')
echo "pubspec version: ${PUBSPEC_VERSION}"
release-it ${PUBSPEC_VERSION} \
--no-git.commit \
--'git.commitMessage="chore: release ${version}"' \
--git.tag \
--'git.tagName="${version}"' \
--'git.tagAnnotation="Release ${version}"' \
--git.push \
--no-github.release \
--no-github.web \
--ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}