15
15
runs-on : ubuntu-latest
16
16
outputs :
17
17
release_created : ${{ steps.release.outputs.release_created }}
18
+ releases_created : ${{ steps.release.outputs.releases_created }}
18
19
tag_name : ${{ steps.release.outputs.tag_name }}
19
20
steps :
20
21
- name : Checkout
32
33
33
34
publish-wasm :
34
35
needs : release
35
- if : ${{ needs.release.outputs.release_created == 'true' }}
36
+ if : ${{ needs.release.outputs.releases_created == 'true' }}
36
37
runs-on : ubuntu-latest
37
38
permissions :
38
39
contents : write
@@ -48,21 +49,28 @@ jobs:
48
49
- name : Install protoc
49
50
run : sudo apt-get update && sudo apt-get install -y protobuf-compiler
50
51
52
+ - name : Extract confidence_resolver version and tag
53
+ id : extract_version
54
+ run : |
55
+ VERSION=$(grep -m1 '^version\s*=\s*"' confidence-resolver/Cargo.toml | sed -E 's/.*"([^"]+)".*/\1/')
56
+ echo "VERSION=$VERSION" >> $GITHUB_ENV
57
+ echo "TAG_NAME=confidence_resolver-v$VERSION" >> $GITHUB_ENV
58
+
51
59
- name : Build WASM artifact
52
60
run : make wasm/confidence_resolver.wasm
53
61
54
62
- name : Upload WASM to GitHub Release
55
63
uses : softprops/action-gh-release@v2
56
64
with :
57
- tag_name : ${{ needs.release.outputs.tag_name }}
65
+ tag_name : ${{ env.TAG_NAME }}
58
66
files : |
59
67
wasm/confidence_resolver.wasm
60
68
env :
61
69
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
62
70
63
71
publish-cloudflare-deployer-image :
64
72
needs : release
65
- if : ${{ needs.release.outputs.release_created == 'true' }}
73
+ if : ${{ needs.release.outputs.releases_created == 'true' }}
66
74
runs-on : ubuntu-latest
67
75
permissions :
68
76
contents : read
71
79
- name : Checkout
72
80
uses : actions/checkout@v4
73
81
82
+ - name : Extract confidence-cloudflare-resolver version and tag
83
+ id : extract_ccr_version
84
+ run : |
85
+ VERSION=$(grep -m1 '^version\s*=\s*"' confidence-cloudflare-resolver/Cargo.toml | sed -E 's/.*"([^\"]+)".*/\1/')
86
+ echo "CCR_VERSION=$VERSION" >> $GITHUB_ENV
87
+ echo "CCR_TAG_NAME=confidence-cloudflare-resolver-v$VERSION" >> $GITHUB_ENV
88
+
74
89
- name : Set up QEMU
75
90
uses : docker/setup-qemu-action@v3
76
91
90
105
with :
91
106
images : ghcr.io/${{ github.repository_owner }}/confidence-cloudflare-deployer
92
107
tags : |
93
- type=raw,value=${{ needs.release.outputs.tag_name }}
108
+ type=raw,value=${{ env.CCR_TAG_NAME }}
94
109
type=raw,value=latest
95
110
96
111
- name : Build and push deployer image
0 commit comments