Skip to content

v0.1.1

v0.1.1 #26

Workflow file for this run

name: release
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- aarch64-unknown-linux-gnu
- x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@v2
- name: Setup Fluent CI and build webui
uses: fluentci-io/setup-fluentci@v5
with:
wasm: true
pipeline: bun
args: |
run build
working-directory: webui
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set RUSTFLAGS
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
echo "RUSTFLAGS=-C linker=aarch64-linux-gnu-gcc -L/usr/aarch64-linux-gnu/lib" >> $GITHUB_ENV
- name: build
run: |
sudo apt-get install -y build-essential gcc-aarch64-linux-gnu libc6-arm64-cross libc6-dev-arm64-cross pkg-config
fluentci run --wasm rust target_add ${{ matrix.target }}
fluentci run --wasm rust build --release --target ${{ matrix.target }}
cp target/${{ matrix.target }}/release/fluentci-studio .
tar czvf fluentci-studio_${{ env.RELEASE_VERSION }}_${{ matrix.target }}.tar.gz fluentci-studio
shasum -a 256 fluentci-studio_${{ env.RELEASE_VERSION }}_${{ matrix.target }}.tar.gz > fluentci-studio_${{ env.RELEASE_VERSION }}_${{ matrix.target }}.tar.gz.sha256
ls -ltr
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Upload assets to Cloudflare R2
run: |
mkdir -p r2/fluentci-studio/${{ env.RELEASE_VERSION }}
cp fluentci-studio_${{ env.RELEASE_VERSION }}_${{ matrix.target }}.tar.gz r2/fluentci-studio/${{ env.RELEASE_VERSION }}
cp fluentci-studio_${{ env.RELEASE_VERSION }}_${{ matrix.target }}.tar.gz.sha256 r2/fluentci-studio/${{ env.RELEASE_VERSION }}
cd r2 && fluentci run --wasm r2-sync upload --endpoint-url https://$ACCOUNT_ID.r2.cloudflarestorage.com s3://assets
env:
TAG: ${{ env.RELEASE_VERSION }}
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ACCOUNT_ID: fe5b1e2ce9f94f4c0415ab94ce402012
- name: Upload release assets
run: |
for ext in tar.gz tar.gz.sha256; do
export FILE=fluentci-studio_${{ env.RELEASE_VERSION }}_${{ matrix.target }}.$ext
fluentci run --wasm github release_upload $TAG $FILE
done
env:
TAG: ${{ env.RELEASE_VERSION }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}