3131 runs-on: ubuntu-latest
3232 # The timeout minutes for the job to complete
3333 timeout-minutes: {{ joss_render_timeout }}
34+ # We trust the deploy action with write permissions
35+ permissions:
36+ id-token: write
3437
3538 steps:
3639 # Checkout your repository under $GITHUB_WORKSPACE so your job can access it
@@ -56,59 +59,17 @@ jobs:
5659 journal: joss
5760 paper-path: paper/paper.md
5861
59- {% if carbon_aware %}
60- {% - raw -%}
61- # Measure energy consumption of the draft build
62- - name: Draft build measurement
63- uses: green-coding-solutions/eco-ci-energy-estimation@862050e4f01f65b1436e5eca18ba4bd85562f0de # v5.0.0
64- with:
65- task: get-measurement
66- label: 'pytest'
67- continue-on-error: true
68-
69- - name: Show Energy Results
70- uses: green-coding-solutions/eco-ci-energy-estimation@862050e4f01f65b1436e5eca18ba4bd85562f0de # v5.0.0
71- with:
72- task: display-results
73- continue-on-error: true
74- {% - endraw -%}
75- {% endif %}
76-
77- # Upload the rendered PDF to GitHub
78- upload-draft:
79- # The type of runner that the job will run on
80- runs-on: ubuntu-latest
81- # The timeout minutes for the job to complete
82- timeout-minutes: {{ joss_upload_timeout }}
83-
84- # The draft need to have been built first
85- needs: [build-draft]
86-
87- # We trust the deploy action with write permissions
88- permissions:
89- id-token: write
90- steps:
91-
92- {% - if carbon_aware -%}
93- {% raw %}
94- - name: Start Measurement
95- uses: green-coding-solutions/eco-ci-energy-estimation@862050e4f01f65b1436e5eca18ba4bd85562f0de # v5.0.0
96- with:
97- task: start-measurement
98- continue-on-error: true
99- {% - endraw -%}
100- {% endif %}
101-
62+ # Upload the paper build
10263 - name: Upload draft PDF
10364 uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v4
10465 with:
10566 name: paper
10667 path: paper/paper.pdf
10768
108- {% if carbon_aware %}
69+ {% - if carbon_aware - %}
10970 {% - raw -%}
110- # Measure energy consumption of the upload
111- - name: Upload measurement
71+ # Measure energy consumption of the draft build
72+ - name: Draft build measurement
11273 uses: green-coding-solutions/eco-ci-energy-estimation@862050e4f01f65b1436e5eca18ba4bd85562f0de # v5.0.0
11374 with:
11475 task: get-measurement
12182 task: display-results
12283 continue-on-error: true
12384 {% - endraw -%}
124- {% - endif - %}
85+ {% endif %}
0 commit comments