1919
2020permissions :
2121 contents : write
22- attestations : write
23- packages : write
2422
2523jobs :
2624 cut_release :
25+ if : github.repository == 'PCSX2/web-api'
2726 name : Cut Release
2827 runs-on : ubuntu-latest
2928 outputs :
3029 new_tag : ${{ steps.set_tag.outputs.new_tag }}
3130 steps :
3231 # Docs - https://github.com/mathieudutour/github-tag-action
3332 - name : Bump Version and Push Tag
34- if : github.repository == 'PCSX2/web-api'
3533 id : tag_version
3634 uses : mathieudutour/github-tag-action@v6.2
3735 with :
4240 - name : Create Release
4341 env :
4442 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45- run : gh release create ${{ steps.tag_version.outputs.new_tag }} --generate-notes --draft -- repo ${{ github.repository }}
43+ run : gh release create ${{ steps.tag_version.outputs.new_tag }} --generate-notes --repo ${{ github.repository }}
4644
4745 - name : Output new tag
4846 id : set_tag
4947 run : |
50- echo "new_tag=${{ steps.tag_version.outputs.new_tag }}" >> $GITHUB_OUTPUT
51-
52- build_image :
53- if : github.repository == 'PCSX2/web-api'
54- needs :
55- - cut_release
56- name : " Build and Publish Image"
57- runs-on : ubuntu-latest
58- steps :
59- - uses : actions/checkout@v4
60- with :
61- ref : ${{ needs.cut_release.outputs.new_tag }}
62-
63- - name : Log in to the Container registry
64- uses : docker/login-action@v3
65- with :
66- registry : ${{ env.REGISTRY }}
67- username : ${{ github.actor }}
68- password : ${{ secrets.GITHUB_TOKEN }}
69-
70- - name : Extract metadata (tags, labels) for Docker
71- id : meta
72- uses : docker/metadata-action@v5
73- with :
74- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
75-
76- - name : Build and push Docker image
77- id : push
78- uses : docker/build-push-action@v6
79- with :
80- context : .
81- push : true
82- tags : ${{ steps.meta.outputs.tags }}
83- labels : ${{ steps.meta.outputs.labels }}
84-
85- - name : Generate artifact attestation
86- uses : actions/attest-build-provenance@v2
87- with :
88- subject-name : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
89- subject-digest : ${{ steps.push.outputs.digest }}
90- push-to-registry : true
91-
92- - name : Publish Release
93- env :
94- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
95- run : |
96- TAG_VAL=${{ needs.cut_release.outputs.new_tag }}
97- gh release edit ${TAG_VAL} --draft=false --repo open-goal/jak-project
48+ echo "new_tag=${{ steps.tag_version.outputs.new_tag }}" >> $GITHUB_OUTPUT
0 commit comments