66 description : " Release version number"
77 type : string
88 required : true
9+ publish :
10+ type : boolean
11+ description : " Publish to WPILib"
12+ default : false
913jobs :
1014 build :
1115 runs-on : ubuntu-latest
1216 permissions :
1317 contents : write
1418 actions : read
15- pages : read
19+ pages : write
1620 deployments : read
21+ id-token : write
1722 env :
1823 releaseVersion : ${{ inputs.releaseVersion }}
1924 workingDirectory : ${{github.workspace}}/vendordep
25+ name : github-pages
26+ # url: ${{steps.deployment.outputs.page_url}}
27+
2028 steps :
2129 - run : git config --global user.name "thenetworkgrinch" && git config --global user.email "thenetworkgrinch@noreply.users.github.com"
2230 - uses : actions/checkout@v4
4250 working-directory : ${{ env.workingDirectory }}
4351 - name : Create new vendor JSON
4452 run : cp ${{ env.workingDirectory }}/build/maven/yams.json ${{ env.workingDirectory }}/build/maven/yams-${{inputs.releaseVersion}}.json
45- - name : Create Vendor JSON Repo PR
46- uses : wpilibsuite/vendor-json-repo/.github/actions/add_vendordep@main
47- with :
48- repo : Yet-Another-Software-Suite/vendor-json-repo
49- token : ${{ secrets.PUBLISH_VENDOR_JSON_TOKEN }}
50- vendordep_file : ${{ env.workingDirectory }}/build/maven/yams-${{inputs.releaseVersion}}.json
51- pr_title : " Automatically add YAMS version ${{inputs.releaseVersion}}"
52- pr_branch : " publish_yams_${{inputs.releaseVersion}}"
53- continue-on-error : true
54- - name : Output Pages Tree
55- run : find ${{ env.workingDirectory }}/build/maven/ -type f
5653 - name : Upload pages
5754 run : git add . && git commit -m "Automatically add YAMS version ${{inputs.releaseVersion}}" && git push
5855 working-directory : ${{ env.workingDirectory }}/build/maven/
@@ -65,18 +62,37 @@ jobs:
6562 name : ' github-pages'
6663 retention-days : ' 90'
6764 path : ${{ env.workingDirectory }}/build/maven/
68-
69- deploy :
70- permissions :
71- contents : write
72- pages : write
73- id-token : write
74- environment :
75- name : github-pages
76- url : ${{steps.deployment.outputs.page_url}}
77- runs-on : ubuntu-latest
78- needs : build
79- steps :
8065 - name : Deploy to GitHub Pages
8166 id : deployment
8267 uses : actions/deploy-pages@v4
68+ - name : Output Pages Tree
69+ run : find ${{ env.workingDirectory }}/build/maven/ -type f
70+ - name : Create Vendor JSON Repo PR
71+ if : ${{ inputs.publish == true }}
72+ uses : wpilibsuite/vendor-json-repo/.github/actions/add_vendordep@main
73+ with :
74+ repo : Yet-Another-Software-Suite/vendor-json-repo
75+ token : ${{ secrets.PUBLISH_VENDOR_JSON_TOKEN }}
76+ vendordep_file : ${{ env.workingDirectory }}/build/maven/yams-${{inputs.releaseVersion}}.json
77+ pr_title : " Automatically add YAMS version ${{inputs.releaseVersion}}"
78+ pr_branch : " publish_yams_${{inputs.releaseVersion}}"
79+ continue-on-error : true
80+ # deploy:
81+ # permissions:
82+ # contents: write
83+ # pages: write
84+ # id-token: write
85+ # environment:
86+ # name: github-pages
87+ # url: ${{steps.deployment.outputs.page_url}}
88+ # runs-on: ubuntu-latest
89+ # needs: build
90+ # steps:
91+ # # - name: Deploy to GitHub Pages
92+ # # id: deployment
93+ # uses: actions/deploy-pages@v4
94+
95+
96+
97+
98+
0 commit comments