-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (96 loc) · 3.32 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
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Publish
on:
push:
branches:
- main
paths:
- '*/Project/Sources/**/*.4dm'
- '*/Project/Sources/*/*.4DForm'
- '*/Project/Sources/*.4DCatalog'
- '*/Project/Resources/**'
workflow_dispatch:
inputs:
mode:
type: choice
description: semantic versioning
options:
- patch
- minor
- major
required: true
env:
project_path: UUID/Project/UUID.4DProject
jobs:
publish:
permissions: write-all
runs-on: [macos-latest]
steps:
- name: configure
id: configure
run: |
if [ "${mode}" = "" ]; then
echo "mode=patch" >> $GITHUB_OUTPUT
else
echo "mode=${mode}" >> $GITHUB_OUTPUT
fi
echo "project_path=${GITHUB_WORKSPACE}/${project_path}" >> $GITHUB_OUTPUT
shell: bash
env:
mode: ${{ inputs.mode }}
- name: checkout
uses: actions/checkout@v4
- name: set version
id: version
uses: miyako/4D/.github/actions/package-set-version@v1
with:
mode: ${{ steps.configure.outputs.mode }}
- name: get tool version
id: tool
uses: miyako/4D/.github/actions/tool4d-get-version@v1
- name: get tool4d
id: get
uses: miyako/4D/.github/actions/tool4d-download@v1
with:
platform: ${{ steps.tool.outputs.platform }}
branch: ${{ steps.tool.outputs.branch }}
version: ${{ steps.tool.outputs.version }}
build: ${{ steps.tool.outputs.build }}
arch: ${{ steps.tool.outputs.arch }}
- name: build
id: build
uses: miyako/4D/.github/actions/build-component@v1
with:
project_path: ${{ steps.configure.outputs.project_path }}
- name: setup keychain
id: keychain
uses: miyako/4D/.github/actions/deployment-setup-keychain@v1
with:
APPLE_DEVELOPER_ID_CERTIFICATE: ${{ secrets.APPLE_DEVELOPER_ID_CERTIFICATE }}
APPLE_DEVELOPER_ID_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_DEVELOPER_ID_CERTIFICATE_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
- name: codesign
id: codesign
uses: miyako/4D/.github/actions/deployment-codesign-product@v1
with:
sign: ${{ secrets.CODESIGN_APPLE_ID }}
apple_id: ${{ secrets.NOTARYTOOL_APPLE_ID }}
team_id: ${{ secrets.NOTARYTOOL_TEAM_ID }}
password: ${{ secrets.NOTARYTOOL_PASSWORD }}
product_path: ${{ steps.build.outputs.product_path }}
keychain: ${{ steps.keychain.outputs.KEYCHAIN_PATH }}
- name: zip
id: zip
uses: miyako/4D/.github/actions/deployment-create-zip@v1
with:
dmg_path: ${{ steps.codesign.outputs.dmg_path }}
zip_path: ${{ steps.codesign.outputs.zip_path }}
- name: upload assets
id: upload
uses: miyako/4D/.github/actions/deployment-release-assets@v1
with:
dmg_path: ${{ steps.zip.outputs.dmg_path }}
zip_path: ${{ steps.zip.outputs.zip_path }}
tag_name: ${{ steps.version.outputs.version }}
release_name: ${{ steps.version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}