Skip to content

Commit 12eb3a0

Browse files
authored
feat: Google Cloud Storage bucket uploads (#94)
1 parent f00ea35 commit 12eb3a0

3 files changed

Lines changed: 30 additions & 3 deletions

File tree

.github/workflows/artifacts.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ jobs:
120120
if [ -d "$target_dir/artifacts" ]; then
121121
echo "Creating archive for $size"
122122
( cd "$target_dir/artifacts" && \
123+
find . -type f -name "*.wasm" -exec bash -c 'mv "$1" "$(dirname "$1")/../"' _ {} \; &&\
124+
rm -rf *_js &&\
123125
zip -r "../../../circom-artifacts-${size}-v${{ env.VERSION }}.zip" . )
124126
fi
125127
done
@@ -134,4 +136,4 @@ jobs:
134136
with:
135137
name: circom-artifacts-v${{ env.VERSION }}
136138
path: circom-artifacts-*-v${{ env.VERSION }}.zip
137-
retention-days: 5
139+
retention-days: 14

.github/workflows/release.yaml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@ permissions:
99
contents: write
1010
pull-requests: write
1111
issues: write
12+
id-token: write
1213

1314
jobs:
1415
release:
1516
name: Release
1617
runs-on: ubuntu-latest
1718
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
1819
steps:
20+
- uses: "google-github-actions/auth@v2"
21+
with:
22+
project_id: "web-prover-circuits-fa4cf3"
23+
workload_identity_provider: "projects/530011589985/locations/global/workloadIdentityPools/github/providers/web-prover-circuits"
24+
1925
- name: Checkout
2026
uses: actions/checkout@v4
2127
with:
@@ -71,4 +77,23 @@ jobs:
7177
tag_name: v${{ env.VERSION }}
7278
body_path: release_notes.md
7379
env:
74-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
82+
- name: Prepare artifacts for Google Cloud Storage Bucket
83+
run: |
84+
# Unzip, then gzip each individual file (but remove .gz suffix), delete zip files
85+
for zip_file in artifacts/circom-artifacts-*-v${{ env.VERSION }}.zip; do
86+
unzip "$zip_file" -d "${zip_file%.zip}"
87+
(cd "${zip_file%.zip}" && gzip -7 * && for file in *.gz; do mv "$file" "${file%.gz}"; done)
88+
done
89+
rm *.zip
90+
91+
- uses: "google-github-actions/upload-cloud-storage@v2"
92+
with:
93+
path: "artifacts"
94+
destination: "web-prover-circuits.pluto.xyz/${{ github.sha }}"
95+
parent: false
96+
gzip: false # already gzipped
97+
headers: |-
98+
content-type: 'application/octet-stream'
99+
content-encoding: 'gzip'

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "web-prover-circuits",
33
"description": "ZK Circuits for WebProofs",
4-
"version": "0.7.2",
4+
"version": "0.7.3",
55
"license": "Apache-2.0",
66
"repository": {
77
"type": "git",

0 commit comments

Comments
 (0)