-
Notifications
You must be signed in to change notification settings - Fork 68
63 lines (56 loc) · 2.26 KB
/
Copy pathrelease-it.yml
File metadata and controls
63 lines (56 loc) · 2.26 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Release a new version
on:
workflow_dispatch:
inputs:
version:
description: 'Version to increment'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major
- preminor
- premajor
- prepatch
studio_pro_version:
description: 'Studio Pro major version (determines the docs parent folder for changelog publishing)'
required: true
default: 'Studio Pro 11.x'
type: choice
options:
- 'Studio Pro 10.x'
- 'Studio Pro 11.x'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PUBLIC_REPO_ADMIN_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
- name: Release a new version
env:
GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_ADMIN_TOKEN }}
run: |
npm install -g release-it
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-action"
release-it -VV --increment=${{ github.event.inputs.version }} --ci --github.release --github.draft --git.commitMessage="chore: release v\${version}" --git.tagName="v\${version}"
- name: Sync docs fork with upstream
if: ${{ contains(fromJSON('["patch","minor","major"]'), github.event.inputs.version) }}
run: gh repo sync MendixMobile/docs --branch development --force
env:
GH_TOKEN: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }}
- name: Install docs release script dependencies
if: ${{ contains(fromJSON('["patch","minor","major"]'), github.event.inputs.version) }}
run: npm ci --prefix .github/scripts
- name: Create Changelog PR in native-template and release notes PR in mendix/docs
if: ${{ contains(fromJSON('["patch","minor","major"]'), github.event.inputs.version) }}
env:
MENDIX_MOBILE_DOCS_PR_GITHUB_PAT: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }}
STUDIO_PRO_MAJOR: ${{ github.event.inputs.studio_pro_version == 'Studio Pro 10.x' && '10' || '11' }}
run: node .github/scripts/release-native-template.mjs