-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (81 loc) · 3.38 KB
/
build-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
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
name: Build release
on:
repository_dispatch:
types: [trigger-workflow]
workflow_dispatch:
jobs:
Upload-release-assets:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Copy repository in runner
id: checkout_repo
uses: actions/checkout@v4
- name: Copy package.json in runner
id: checkout_info_report
uses: actions/checkout@v4
with:
repository: 4eDimension/4D_Info_Report
token: ${{ secrets.TARGET_TOKEN_GITHUB }}
ref: main
path: 4D_Info_Report
- name: Get version
id: version
run: |
git pull origin main
{
echo 'inforeport_version<<EOF'
cat 4D_Info_Report/package.json | jq -r ".version"
echo EOF
} >> "$GITHUB_OUTPUT"
shell: bash
- name: Get major version
id: major_version
run: |
TAG=${{ steps.version.outputs.inforeport_version }}
echo "major_version=${TAG:0:1}" >> $GITHUB_OUTPUT
shell: bash
#4.82.2
- name: Get minor version
id: minor_version
run: |
TAG=${{ steps.version.outputs.inforeport_version }}
echo "minor_version=${TAG:2:2}" >> $GITHUB_OUTPUT
shell: bash
- name: Get patch version
id: patch_version
run: |
TAG=${{ steps.version.outputs.inforeport_version }}
echo "patch_version=${TAG:5:1}" >> $GITHUB_OUTPUT
shell: bash
- name: Download artifact 4D R
id: download-4D-R
run: |
mkdir 4DIR
curl --ftp-ssl-reqd --user ${{ secrets.FTP_PRIVATE_LOGIN }}:'${{ secrets.FTP_PRIVATE_PASSWORD }}' --output ./4DIR/4D_Info_Report.zip ${{ secrets.FTP_PRIVATE_PATH }}4D_Info_Report-R.zip
shell: bash
- name: Upload asset 4D R
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.TARGET_TOKEN_GITHUB }}
file: ./4DIR/4D_Info_Report.zip
tag: "20.6.0"
body: for automatic download via dependencies manager (see procedure n°1)
file_glob: true
overwrite: true
- name: Download others artifacts
id: download
run: |
rm 4DIR/4D_Info_Report.zip
curl --ftp-ssl-reqd --user ${{ secrets.FTP_PRIVATE_LOGIN }}:'${{ secrets.FTP_PRIVATE_PASSWORD }}' --output ./4DIR/4D_Info_Report_v${{ steps.major_version.outputs.major_version }}_${{ steps.minor_version.outputs.minor_version }}_${{ steps.patch_version.outputs.patch_version }}_20R6.zip ${{ secrets.FTP_PRIVATE_PATH }}4D_Info_Report-R.zip
curl --ftp-ssl-reqd --user ${{ secrets.FTP_PRIVATE_LOGIN }}:'${{ secrets.FTP_PRIVATE_PASSWORD }}' --output ./4DIR/4D_Info_Report_v${{ steps.major_version.outputs.major_version }}_${{ steps.minor_version.outputs.minor_version }}_${{ steps.patch_version.outputs.patch_version }}_20.zip ${{ secrets.FTP_PRIVATE_PATH }}4D_Info_Report-LTS.zip
shell: bash
- name: Upload others assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.TARGET_TOKEN_GITHUB }}
file: ./4DIR/4D*
tag: ${{ steps.version.outputs.inforeport_version }}
body: 4D_Info_Report v${{ steps.version.outputs.inforeport_version }} for the latest 4D Rx & LTS versions (compiled for Intel and Silicon)
file_glob: true
overwrite: true