1515 runs-on : ubuntu-latest
1616 outputs :
1717 release_created : ${{ steps.release.outputs.release_created }}
18+ releases_created : ${{ steps.release.outputs.releases_created }}
1819 tag_name : ${{ steps.release.outputs.tag_name }}
1920 steps :
2021 - name : Checkout
3233
3334 publish-wasm :
3435 needs : release
35- if : ${{ needs.release.outputs.release_created == 'true' }}
36+ if : ${{ needs.release.outputs.releases_created == 'true' }}
3637 runs-on : ubuntu-latest
3738 permissions :
3839 contents : write
@@ -48,21 +49,28 @@ jobs:
4849 - name : Install protoc
4950 run : sudo apt-get update && sudo apt-get install -y protobuf-compiler
5051
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+
5159 - name : Build WASM artifact
5260 run : make wasm/confidence_resolver.wasm
5361
5462 - name : Upload WASM to GitHub Release
5563 uses : softprops/action-gh-release@v2
5664 with :
57- tag_name : ${{ needs.release.outputs.tag_name }}
65+ tag_name : ${{ env.TAG_NAME }}
5866 files : |
5967 wasm/confidence_resolver.wasm
6068 env :
6169 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6270
6371 publish-cloudflare-deployer-image :
6472 needs : release
65- if : ${{ needs.release.outputs.release_created == 'true' }}
73+ if : ${{ needs.release.outputs.releases_created == 'true' }}
6674 runs-on : ubuntu-latest
6775 permissions :
6876 contents : read
7179 - name : Checkout
7280 uses : actions/checkout@v4
7381
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+
7489 - name : Set up QEMU
7590 uses : docker/setup-qemu-action@v3
7691
90105 with :
91106 images : ghcr.io/${{ github.repository_owner }}/confidence-cloudflare-deployer
92107 tags : |
93- type=raw,value=${{ needs.release.outputs.tag_name }}
108+ type=raw,value=${{ env.CCR_TAG_NAME }}
94109 type=raw,value=latest
95110
96111 - name : Build and push deployer image
0 commit comments