Skip to content

Release

Release #55

Workflow file for this run

name: Release
on:
push:
schedule:
# Run daily sanity check at 22:08 clock UTC
- cron: "8 22 * * *"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: macos-11
strategy:
matrix:
arch: [amd64, arm64]
steps:
- uses: actions/checkout@v3
- name: Install macfuse
run: |
# install header
wget https://github.com/macos-fuse-t/libfuse/archive/c91fefd0d1e6dee6f455b9c6c6e0290b6aa7a62a.zip
unzip c91fefd0d1e6dee6f455b9c6c6e0290b6aa7a62a.zip
rm -rf /usr/local/include/fuse
cp -r libfuse-c91fefd0d1e6dee6f455b9c6c6e0290b6aa7a62a/include /usr/local/include/fuse
# install fuse-t lib and binary
wget https://github.com/macos-fuse-t/fuse-t/releases/download/1.0.24/fuse-t-macos-installer-1.0.24.pkg
sudo installer -pkg fuse-t-macos-installer-1.0.24.pkg -target /
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: build
run: |
mkdir build
cd build
if [[ "${{matrix.arch}}" == "arm64" ]]; then
cmake -DWITH_LIBFUSE3=OFF -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk ..
else
cmake -DWITH_LIBFUSE3=OFF ..
fi
make
cp src/unionfs ../unionfs
cp src/unionfsctl ../unionfsctl
- name: store-artifacts
uses: actions/upload-artifact@v3
with:
name: unionfs-artifacts-darwin-${{ matrix.arch }}
path: |
unionfs
unionfsctl
prepare-tarball:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, arm64]
os: [darwin]
needs: [build]
steps:
- name: download artifacts
uses: actions/download-artifact@v3
with:
name: unionfs-artifacts-${{ matrix.os }}-${{ matrix.arch }}
path: unionfs
- name: prepare release tarball
run: |
tag=$(echo $GITHUB_REF | sed 's/\//-/g')
tarball="unionfs-$tag-${{ matrix.os }}-${{ matrix.arch }}.tgz"
chmod +x unionfs/*
tar cf - unionfs | gzip > ${tarball}
echo "tarball=${tarball}" >> $GITHUB_ENV
shasum="$tarball.sha256sum"
sha256sum $tarball > $shasum
echo "tarball_shasum=${shasum}" >> $GITHUB_ENV
- name: store-artifacts
uses: actions/upload-artifact@v3
with:
name: unionfs-release-tarball
path: |
${{ env.tarball }}
${{ env.tarball_shasum }}
create-release:
runs-on: ubuntu-latest
needs: [prepare-tarball]
steps:
- name: download artifacts
uses: actions/download-artifact@v3
with:
name: unionfs-release-tarball
path: unionfs-tarball
- name: prepare release env
run: |
echo "tarballs<<EOF" >> $GITHUB_ENV
for I in $(ls unionfs-tarball);do echo "unionfs-tarball/${I}" >> $GITHUB_ENV; done
echo "EOF" >> $GITHUB_ENV
tag=$(echo $GITHUB_REF | sed 's/\//-/g')
echo "tag=${tag}" >> $GITHUB_ENV
cat $GITHUB_ENV
- name: push release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
name: "unionfs ${{ env.tag }}"
body: |
unionfs for fuse-t
generate_release_notes: true
files: |
${{ env.tarballs }}