-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add action to generate tarball with microtex included.
- Loading branch information
Kasper Peeters
committed
Oct 25, 2024
1 parent
bd98994
commit ba939ea
Showing
2 changed files
with
50 additions
and
1 deletion.
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,49 @@ | ||
# This is a build which gets triggered on every release, to | ||
# generate a tarball which includes all submodules. | ||
|
||
name: Tarball | ||
|
||
# on: | ||
# release: | ||
# types: [created] | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Cadabra | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up GitHub CLI | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y gh | ||
- name: Authenticate GitHub CLI | ||
run: gh auth setup-git | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create tarball | ||
run: | | ||
export CDB_MAJOR=`cat cmake/version.cmake |grep 'MAJOR '|sed -e 's/[^ ]* \([0-9]*\).*/\1/'` | ||
export CDB_MINOR=`cat cmake/version.cmake |grep 'MAJOR '|sed -e 's/[^ ]* \([0-9]*\).*/\1/'` | ||
export CDB_PATCH=`cat cmake/version.cmake |grep 'MAJOR '|sed -e 's/[^ ]* \([0-9]*\).*/\1/'` | ||
export VERSION=${CDB_MAJOR}.${CDB_MINOR}.${CDB_PATCH} | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
mkdir -p submodules | ||
cd submodules | ||
git clone https://github.com/kpeeters/MicroTeX.git microtex | ||
cd ../.. | ||
tar zcf cadabra2-${VERSION}-inclusive.tar.gz --exclude ".git" cadabra2 | ||
- name: Upload tarball to assets | ||
run: | | ||
gh release upload "${{ env.VERSION }}" ${{ github.workspace }}/cadabra2-${VERSION}-inclusive.tar.gz --clobber | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
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