-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a release file containing submodules (#825)
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Release File | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
upload_archive: | ||
name: Upload archive | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: | | ||
ref=${{ github.ref_name }} | ||
echo "release_name=manifold-${ref#v}" >> $GITHUB_ENV | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: ${{ env.release_name }} | ||
submodules: recursive | ||
- name: Build archive | ||
run: > | ||
tar --exclude=".git*" -cz ${{ env.release_name }} -f ${{ env.release_name }}.tar.gz | ||
- name: Log checksum | ||
run: > | ||
sha256sum ${{ env.release_name }}.tar.gz | ||
- name: Add file to release | ||
run: | | ||
cd ${{ env.release_name }} || exit 1 | ||
gh release upload ${{ github.ref_name }} ../${{ env.release_name }}.tar.gz | ||
env: | ||
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} |