Skip to content

trigger-workflow

trigger-workflow #15

Workflow file for this run

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