Skip to content

Commit

Permalink
Release script & CI: name based on tag (WIP broken)
Browse files Browse the repository at this point in the history
  • Loading branch information
sullyj3 committed Jul 25, 2024
1 parent 167775f commit 06ef66e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: "true"
- name: Run Lean Action
uses: leanprover/lean-action@v1
with:
auto-config: "false"
use-mathlib-cache: "false"
build: "true"
- name: Create package
id: create-package
run: |
./create_release.sh
- name: Upload artifact
uses: actions/upload-artifact@v4.3.4
with:
name: sand
path: release.tar.zst
path: release/sand-*-x86_64-linux.tar.zst
33 changes: 23 additions & 10 deletions create_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,30 @@ if [ ! -f .lake/build/bin/sand ]; then
exit 1
fi

mkdir -p release
tag=$(git describe --tags --abbrev=0)
dir="sand-$tag"

cp -f .lake/build/bin/sand release/
cp -rf resources release/
cp -f scripts/install.sh release/
cp -f LICENSE release/
cp -f README.md release/
set -x

strip release/sand
mkdir -p "release/$dir"

tar --zstd -cvf release.tar.zst release 2>&1 > /dev/null
cp -f .lake/build/bin/sand release/$dir/
cp -rf resources release/$dir/
cp -f scripts/install.sh release/$dir/
cp -f LICENSE release/$dir/
cp -f README.md release/$dir/

echo 'release created at `release`'
echo 'release archive created at `release.tar.zst`'
pushd release/ > /dev/null

strip $dir/sand

archive="$dir-x86_64-linux.tar.zst"

tar --zstd -cvf $archive $dir 2>&1 > /dev/null

popd > /dev/null

set +x

echo "release created at release/$dir"
echo "release archive created at release/$archive"

0 comments on commit 06ef66e

Please sign in to comment.