Skip to content

v0.14.0

v0.14.0 #61

Workflow file for this run

name: release
on:
release:
types: [created]
jobs:
build:
name: release
runs-on: ubuntu-latest
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
- x86_64-apple-darwin
- aarch64-apple-darwin
steps:
- uses: actions/checkout@v3
- name: Setup Fluent CI
uses: fluentci-io/setup-fluentci@v5
with:
wasm: true
plugin: deno
args: |
compile -A --output fluentci --target ${{ matrix.target }} main.ts
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Archive assets
run: |
tar czvf fluentci_${{ env.RELEASE_VERSION }}_${{ matrix.target }}.tar.gz fluentci
shasum -a 256 fluentci_${{ env.RELEASE_VERSION }}_${{ matrix.target }}.tar.gz > fluentci_${{ env.RELEASE_VERSION }}_${{ matrix.target }}.tar.gz.sha256
- name: Upload assets to Cloudflare R2
run: |
mkdir -p r2/fluentci/${{ env.RELEASE_VERSION }}
cp fluentci_${{ env.RELEASE_VERSION }}_${{ matrix.target }}.tar.gz r2/fluentci/${{ env.RELEASE_VERSION }}
cp fluentci_${{ env.RELEASE_VERSION }}_${{ matrix.target }}.tar.gz.sha256 r2/fluentci/${{ 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 }}
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_${{ 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 }}