Skip to content

Commit

Permalink
Fix release exports.
Browse files Browse the repository at this point in the history
  • Loading branch information
coreprocess committed May 9, 2021
1 parent 71837dd commit 30f4e2b
Show file tree
Hide file tree
Showing 223 changed files with 31 additions and 15 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Create ZIP files
run: ./dist_zips.sh

- name: Create release
uses: actions/github-script@v4
with:
Expand All @@ -29,23 +32,13 @@ jobs:
result-encoding: string
id: create-release

- name: Export library
run: |
git archive -o ./t3dn_bip.zip HEAD:bip/t3dn_bip
curl \
--data-binary @"t3dn_bip.zip" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
"https://uploads.github.com/repos/${{ github.repository }}/releases/${{ steps.create-release.outputs.result }}/assets?name=t3dn_bip.zip"
- name: Export examples
- name: Upload ZIP files
run: |
for example in "t3dn_bip_showcase";
for zip_file in $(find dist_zips -mindepth 1 -maxdepth 1 -type f -name "*.zip");
do
git archive -o ./${example}.zip HEAD:example/${example}
curl \
--data-binary @"${example}.zip" \
--data-binary @"$zip_file" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
"https://uploads.github.com/repos/${{ github.repository }}/releases/${{ steps.create-release.outputs.result }}/assets?name=${example}.zip"
"https://uploads.github.com/repos/${{ github.repository }}/releases/${{ steps.create-release.outputs.result }}/assets?name=$(basename "$zip_file")"
done
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
__pycache__

/build_docs
/dist_zips
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.9
0.1.11
22 changes: 22 additions & 0 deletions dist_zips.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# strict mode
set -euo pipefail
IFS=$'\n\t'
cd "$( dirname "${BASH_SOURCE[0]}" )"

# create zips
DIST_PATH="$(realpath dist_zips)"

generate_zip () {
pushd "$(dirname "$1")"
7z a -l "$DIST_PATH/$(basename "$1").zip" "$(basename "$1")"
popd
}

generate_zip "bip/t3dn_bip"

for example in $(find examples -mindepth 1 -maxdepth 1 -type d);
do
generate_zip "$example"
done
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 30f4e2b

Please sign in to comment.