trigger-workflow #33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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@v6 | |
| - name: Copy package.json in runner | |
| id: checkout_info_report | |
| uses: actions/checkout@v6 | |
| 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:2}" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Download artifacts | |
| id: download | |
| run: | | |
| mkdir 4DIR | |
| 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 }}_21R3.zip ${{ secrets.FTP_PRIVATE_PATH }}4D_Info_Report-21R3.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 }}_21R2.zip ${{ secrets.FTP_PRIVATE_PATH }}4D_Info_Report-21R2.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 }}_21.zip ${{ secrets.FTP_PRIVATE_PATH }}4D_Info_Report-21-LTS.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 }}_20R10.zip ${{ secrets.FTP_PRIVATE_PATH }}4D_Info_Report-20R10.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-20-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 | |
| - name: Download artifact 4D 20R10 | |
| id: download-4D-20R10 | |
| run: | | |
| rm 4DIR/*.zip | |
| 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-20R10.zip | |
| shell: bash | |
| - name: Upload asset 4D 20R10 | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.TARGET_TOKEN_GITHUB }} | |
| file: ./4DIR/4D_Info_Report.zip | |
| tag: "20R10.2" | |
| body: for automatic download via dependencies manager (see readme) | |
| file_glob: true | |
| overwrite: true | |
| - name: Download artifact 4D 21 | |
| id: download-4D-21 | |
| 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.zip ${{ secrets.FTP_PRIVATE_PATH }}4D_Info_Report-21-LTS.zip | |
| shell: bash | |
| - name: Upload asset 4D 21 | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.TARGET_TOKEN_GITHUB }} | |
| file: ./4DIR/4D_Info_Report.zip | |
| tag: "21.2" | |
| body: for automatic download via dependencies manager (see readme) | |
| file_glob: true | |
| overwrite: true | |
| - name: Download artifact 4D 21R2 | |
| id: download-4D-21R2 | |
| 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.zip ${{ secrets.FTP_PRIVATE_PATH }}4D_Info_Report-21R2.zip | |
| shell: bash | |
| - name: Upload asset 4D 21R2 | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.TARGET_TOKEN_GITHUB }} | |
| file: ./4DIR/4D_Info_Report.zip | |
| tag: "21R2.2" | |
| body: for automatic download via dependencies manager (see readme) | |
| file_glob: true | |
| overwrite: true | |
| - name: Download artifact 4D 21R3 | |
| id: download-4D-21R3 | |
| 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.zip ${{ secrets.FTP_PRIVATE_PATH }}4D_Info_Report-21R3.zip | |
| shell: bash | |
| - name: Upload asset 4D 21R3 | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.TARGET_TOKEN_GITHUB }} | |
| file: ./4DIR/4D_Info_Report.zip | |
| tag: "21R3.2" | |
| body: for automatic download via dependencies manager (see readme) | |
| file_glob: true | |
| overwrite: true |