|
| 1 | +# This is a basic workflow to help you get started with Actions |
| 2 | + |
| 3 | +name: Build_VIPM_Library |
| 4 | + |
| 5 | +# Controls when the workflow will run |
| 6 | +on: |
| 7 | + # Triggers the workflow on push or pull request events but only for the main branch |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - main |
| 11 | + types: [closed] |
| 12 | + |
| 13 | + push: |
| 14 | + paths-ignore: |
| 15 | + - '**.md' |
| 16 | + |
| 17 | + # Allows you to run this workflow manually from the Actions tab |
| 18 | + workflow_dispatch: |
| 19 | + |
| 20 | +# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 21 | +jobs: |
| 22 | + # This workflow contains a single job called "build" |
| 23 | + Build_VIPM_Library: |
| 24 | + # The type of runner that the job will run on |
| 25 | + runs-on: [self-hosted, lv2020] |
| 26 | + |
| 27 | + # Steps represent a sequence of tasks that will be executed as part of the job |
| 28 | + steps: |
| 29 | + |
| 30 | + # Get env variables |
| 31 | + # https://github.com/marketplace/actions/github-environment-variables-action |
| 32 | + - uses: FranzDiebold/github-env-vars-action@v2 |
| 33 | + |
| 34 | + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
| 35 | + - uses: actions/checkout@v3 |
| 36 | + |
| 37 | + - name: vipm-InstallPackage |
| 38 | + uses: NEVSTOP-LAB/vipm-InstallPackage@main |
| 39 | + with: |
| 40 | + LabVIEW_Version: 2020 |
| 41 | + # Package could be PackageName/PacakgeWithVersion/vipFilePath |
| 42 | + Package: "GlobalStop" |
| 43 | + Package1: "JKI TCP Server" |
| 44 | + |
| 45 | + - uses: NEVSTOP-LAB/InstallNevstopPackage@main |
| 46 | + with: |
| 47 | + LabVIEW_Version: 2020 |
| 48 | + NEVSTOP-FTP-IP: ${{ secrets.VIPM_FTP_IP }} |
| 49 | + NEVSTOP-FTP-PORT: ${{ secrets.VIPM_FTP_PORT }} |
| 50 | + PackageName: Communicable-State-Machine |
| 51 | + PackageName1: CSM-MassData-Parameter-Support |
| 52 | + PackageName2: CSM-API-String-Arguments-Support |
| 53 | + PackageName3: CSM-INI-Static-Variable-Support |
| 54 | + |
| 55 | + # Runs a set of commands using the runners shell |
| 56 | + - name: BuildDailyVIP |
| 57 | + id: build-vip |
| 58 | + uses: NEVSTOP-LAB/vipm-BuildViPackage@main |
| 59 | + with: |
| 60 | + LabVIEW_Version: 2020 |
| 61 | + VipbPath: ${{ github.workspace }} |
| 62 | + |
| 63 | + - name: Upload a Build Artifact |
| 64 | + uses: actions/upload-artifact@v3.0.0 |
| 65 | + with: |
| 66 | + # Artifact name |
| 67 | + name: ${{ steps.build-vip.outputs.vipName }} |
| 68 | + path: ${{ steps.build-vip.outputs.vipPathName }} |
| 69 | + # The desired behavior if no files are found using the provided path. |
| 70 | + if-no-files-found: warn |
| 71 | + retention-days: 90 |
| 72 | + |
| 73 | + # Backup generated files by ftp |
| 74 | + # https://github.com/marketplace/actions/simple-ftp-upload |
| 75 | + - name: backup Build Artifact by ftp |
| 76 | + uses: dennisameling/ftp-upload-action@v1.0.9 |
| 77 | + with: |
| 78 | + server: ${{ secrets.VIPM_FTP_IP }} |
| 79 | + port: ${{ secrets.VIPM_FTP_PORT }} |
| 80 | + username: ${{ secrets.VIPM_FTP_USER }} |
| 81 | + password: ${{ secrets.VIPM_FTP_PASSWORD }} |
| 82 | + secure: false |
| 83 | + server_dir: /${{ env.CI_REPOSITORY_OWNER_SLUG }}/${{ env.CI_REPOSITORY_NAME }}/${{ env.CI_ACTION_REF_NAME }}/ |
| 84 | + local_dir: ./vip/ |
| 85 | + |
0 commit comments