Skip to content

Commit

Permalink
Add CI script to package objects (#9)
Browse files Browse the repository at this point in the history
* Add ci script to package objects
  • Loading branch information
duncanspumpkin authored Nov 3, 2024
1 parent 4c3c2ea commit 6247bab
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI
on: [push, pull_request]
defaults:
run:
shell: bash
jobs:
package_objects:
name: Package Objects
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare Output Directories
run: for d in objects/*/ ; do mkdir -p ./artifacts/$d; done;
- name: Copy Objects to Output Structure
run: for d in objects/*/ ; do find "$d" -name *.dat -exec cp {} ./artifacts/$d \;; done;
- name: Package Objects
run: cd artifacts/objects; zip ../../objects.zip ./* -r; cd ../..
- name: Hash Objects
run: echo "SHA256=$(sha256sum objects.zip | cut -d " " -f 1)" >> $GITHUB_OUTPUT
id: hash
- name: Upload artifacts (CI)
uses: actions/upload-artifact@v4
with:
name: objects
path: objects.zip
if-no-files-found: error
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
body: SHA256:${{ steps.hash.outputs.SHA256 }}
files: objects.zip

0 comments on commit 6247bab

Please sign in to comment.