|
| 1 | +# trigger on the cix.x.x tag. |
| 2 | +name: CI process chain |
| 3 | +run-name: ${{ github.actor }} running CI process on cix.x.x tag creation |
| 4 | +on: |
| 5 | + workflow_dispatch: |
| 6 | + push: |
| 7 | + tags: |
| 8 | + - "ci*.*.*" |
| 9 | +env: |
| 10 | + VERSION_TAG: ${{ github.ref_name }} |
| 11 | +jobs: |
| 12 | + createReleaseTag: |
| 13 | + runs-on: windows-latest |
| 14 | + outputs: |
| 15 | + tag_name: ${{ steps.increment_version.outputs.NEW_VERSION }} |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v4 |
| 18 | + with: |
| 19 | + ref: master |
| 20 | + - name: npm install |
| 21 | + run: npm install |
| 22 | + - name: Increment Patch Version |
| 23 | + id: increment_version |
| 24 | + run: | |
| 25 | + $version = "${{ env.VERSION_TAG }}" |
| 26 | + $newVersion = "$version".replace("ci","v") |
| 27 | + Write-Output "Generated Tag: $newVersion" |
| 28 | + "NEW_VERSION=$newVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
| 29 | + "NEW_VERSION=$newVersion" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append |
| 30 | + shell: pwsh |
| 31 | + - name: test output |
| 32 | + run: | |
| 33 | + echo "VERSION_TAG is ${{env.VERSION_TAG}}" |
| 34 | + echo "NEW_VERSION is ${{ steps.increment_version.outputs.NEW_VERSION }}" |
| 35 | + shell: pwsh |
| 36 | + - name: note time to check it was built later |
| 37 | + run: more .\extensions\users\README.md |
| 38 | + - name: running node readmebuilder.mjs |
| 39 | + run: | |
| 40 | + cd docs/apidocs |
| 41 | + node readmebuilder.mjs |
| 42 | + - name: check timestamp for update |
| 43 | + run: | |
| 44 | + dir |
| 45 | + more extensions\users\README.md |
| 46 | + - name: adding files to git |
| 47 | + run: | |
| 48 | + git config --global user.email "[email protected]" |
| 49 | + git config --global user.name "SilenusTA" |
| 50 | + foreach($line in Get-Content .\docs\apidocs\filelist.txt) {if($line -match $regex){git add $line}} |
| 51 | + git commit -m "autodoc readme update" |
| 52 | + git push |
| 53 | + - name: Pushing tag to repo |
| 54 | + run: | |
| 55 | + echo "Pushing TAG ${{ steps.increment_version.outputs.NEW_VERSION }}" |
| 56 | + git tag ${{ steps.increment_version.outputs.NEW_VERSION }} |
| 57 | + git push origin --tags |
| 58 | + shell: pwsh |
| 59 | + BuildRelease: |
| 60 | + needs: createReleaseTag |
| 61 | + uses: ./.github/workflows/create_dev_build.yml |
| 62 | + with: |
| 63 | + tag: ${{ needs.createReleaseTag.outputs.tag_name }} |
| 64 | + UpdateDocs: |
| 65 | + needs: [BuildRelease,createReleaseTag] |
| 66 | + uses: ./.github/workflows/build_docs.yml |
| 67 | + with: |
| 68 | + tag: ${{ needs.createReleaseTag.outputs.tag_name }} |
| 69 | + secrets: inherit |
0 commit comments