-
Notifications
You must be signed in to change notification settings - Fork 20
65 lines (60 loc) · 1.99 KB
/
BuildMpk.yml
File metadata and controls
65 lines (60 loc) · 1.99 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
64
65
name: Build MPK
on:
workflow_dispatch:
inputs:
module:
description: "Select the module to create MPK for"
required: true
type: choice
options:
- mobile-resources-native
- nanoflow-actions-native
version:
description: "Version to increase"
required: true
type: choice
default: patch
options:
- patch
- minor
- major
jobs:
publish_release:
name: "Build MPK"
runs-on: ubuntu-latest
steps:
- name: "Checking-out code"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: false
- name: "Defining node version"
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: ".nvmrc"
package-manager-cache: false
- name: "Setup pnpm"
uses: pnpm/action-setup@a8198c4bff370c8506180b035930dea56dbd5288 # v5
- name: "Installing dependencies"
run: pnpm install
- name: "Bumping version"
id: bump_version
run: |
NEW_VER=$(npm --prefix "./packages/jsActions/${{ inputs.module }}" version "${{ inputs.version }}" --no-git-tag-version)
echo "VERSION=${NEW_VER}" >> "$GITHUB_OUTPUT"
- name: "Building native widgets and js actions"
run: pnpm -r run release
- name: "Updating Native Mobile Resources project"
run: pnpm run build-mpk
env:
MODULE: ${{ inputs.module }}
VERSION: ${{ steps.bump_version.outputs.VERSION }}
- name: "Upload MPK artifact"
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f #v7
with:
name: ${{ env.ARTIFACT_NAME }}-${{ steps.bump_version.outputs.VERSION }}
path: ${{ env.ARTIFACT_PATH }}
if-no-files-found: error
- name: "Cleanup tmp folder"
if: ${{ always() }}
run: |
sudo rm -rf tmp || true