Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 10cca36

Browse files
authored
Add release pipeline (#3)
* Add initial automated release pipeline * Only start the release process once the binaries are built * Adjust asset paths used when building the release * Use relative asset paths * Add debug output, add file types * Add more debugging output * There are no Zip archives, just the .so libraries * Removing debug output and steps
1 parent a0af43c commit 10cca36

File tree

1 file changed

+73
-2
lines changed

1 file changed

+73
-2
lines changed

Diff for: .github/workflows/main.yaml

+73-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: CI
44

55
jobs:
66
build-zkgroup:
7-
name: build zkgroup
7+
name: Build zkgroup
88
strategy:
99
matrix:
1010
target:
@@ -47,6 +47,77 @@ jobs:
4747
- name: Upload built artifact
4848
uses: actions/upload-artifact@v2
4949
with:
50-
name: zkgroup-debug-${{ matrix.target }}
50+
name: zkgroup-${{ matrix.target }}
5151
path: lib/zkgroup/target/${{ matrix.target }}/debug/libzkgroup.so
5252
if-no-files-found: error
53+
54+
release:
55+
name: Create zkgroup release
56+
# This ensures that this job only runs on git tags
57+
if: startsWith(github.ref, 'refs/tags/v')
58+
needs:
59+
- build-zkgroup
60+
runs-on: ubuntu-latest
61+
62+
steps:
63+
- name: Check out code
64+
uses: actions/checkout@v2
65+
with:
66+
submodules: recursive
67+
68+
- name: Get git tag version
69+
id: get_version
70+
uses: battila7/get-version-action@v2
71+
72+
- name: Set git tag version
73+
run: |
74+
echo "VERSION=${{ steps.get_version.outputs.version }}" >> $GITHUB_ENV
75+
76+
- name: Download build artifacts
77+
uses: actions/download-artifact@v2
78+
with:
79+
path: build-artifacts
80+
81+
- name: Create draft GitHub release page
82+
id: create_release
83+
uses: actions/create-release@v1
84+
env:
85+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86+
with:
87+
tag_name: ${{ env.VERSION }}
88+
release_name: ${{ env.VERSION }}
89+
body: |
90+
-
91+
-
92+
draft: true
93+
prerelease: false
94+
95+
- name: Add zkgroup to release (x86_64)
96+
uses: actions/upload-release-asset@v1
97+
env:
98+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99+
with:
100+
upload_url: ${{ steps.create_release.outputs.upload_url }}
101+
asset_path: ./build-artifacts/zkgroup-x86_64-unknown-linux-gnu/libzkgroup.so
102+
asset_name: libzkgroup-linux_x86_64-${{ env.VERSION }}.so
103+
asset_content_type: application/octet-stream
104+
105+
- name: Add zkgroup to release (aarch64)
106+
uses: actions/upload-release-asset@v1
107+
env:
108+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109+
with:
110+
upload_url: ${{ steps.create_release.outputs.upload_url }}
111+
asset_path: ./build-artifacts/zkgroup-aarch64-unknown-linux-gnu/libzkgroup.so
112+
asset_name: libzkgroup-linux-aarch64-${{ env.VERSION }}.so
113+
asset_content_type: application/octet-stream
114+
115+
- name: Add zkgroup to release (armv7)
116+
uses: actions/upload-release-asset@v1
117+
env:
118+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119+
with:
120+
upload_url: ${{ steps.create_release.outputs.upload_url }}
121+
asset_path: ./build-artifacts/zkgroup-armv7-unknown-linux-gnueabihf/libzkgroup.so
122+
asset_name: libzkgroup-linux-armv7-${{ env.VERSION }}.so
123+
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)