19
19
20
20
permissions :
21
21
contents : write
22
- attestations : write
23
- packages : write
24
22
25
23
jobs :
26
24
cut_release :
25
+ if : github.repository == 'PCSX2/web-api'
27
26
name : Cut Release
28
27
runs-on : ubuntu-latest
29
28
outputs :
30
29
new_tag : ${{ steps.set_tag.outputs.new_tag }}
31
30
steps :
32
31
# Docs - https://github.com/mathieudutour/github-tag-action
33
32
- name : Bump Version and Push Tag
34
- if : github.repository == 'PCSX2/web-api'
35
33
id : tag_version
36
34
uses :
mathieudutour/[email protected]
37
35
with :
42
40
- name : Create Release
43
41
env :
44
42
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 }}
46
44
47
45
- name : Output new tag
48
46
id : set_tag
49
47
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