Skip to content

Commit 6247bab

Browse files
Add CI script to package objects (#9)
* Add ci script to package objects
1 parent 4c3c2ea commit 6247bab

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
on: [push, pull_request]
3+
defaults:
4+
run:
5+
shell: bash
6+
jobs:
7+
package_objects:
8+
name: Package Objects
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
- name: Prepare Output Directories
14+
run: for d in objects/*/ ; do mkdir -p ./artifacts/$d; done;
15+
- name: Copy Objects to Output Structure
16+
run: for d in objects/*/ ; do find "$d" -name *.dat -exec cp {} ./artifacts/$d \;; done;
17+
- name: Package Objects
18+
run: cd artifacts/objects; zip ../../objects.zip ./* -r; cd ../..
19+
- name: Hash Objects
20+
run: echo "SHA256=$(sha256sum objects.zip | cut -d " " -f 1)" >> $GITHUB_OUTPUT
21+
id: hash
22+
- name: Upload artifacts (CI)
23+
uses: actions/upload-artifact@v4
24+
with:
25+
name: objects
26+
path: objects.zip
27+
if-no-files-found: error
28+
- name: Release
29+
uses: softprops/action-gh-release@v2
30+
if: startsWith(github.ref, 'refs/tags/')
31+
with:
32+
body: SHA256:${{ steps.hash.outputs.SHA256 }}
33+
files: objects.zip

0 commit comments

Comments
 (0)