-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (58 loc) · 1.81 KB
/
publish-json-sql.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Publish json-sql to Hub
permissions: read-all
on:
workflow_dispatch:
inputs:
branch:
description: "The branch, tag or SHA to checkout"
required: true
type: string
default: "main"
smartmodule-version:
description: "The version of the smartmodule, should be same as in the SmartModule.toml"
required: true
type: string
target_prod:
description: "Target the prod hub"
required: true
type: boolean
default: false
jobs:
build:
runs-on: ubuntu-latest
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
steps:
- name: Install Fluvio
run: |
curl -fsS https://hub.infinyon.cloud/install/install.sh | bash
echo "$HOME/.fluvio/bin" >> $GITHUB_PATH
- name: Install Fluvio SMDK
run: fluvio install smdk
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Setup wasm32-unknown-unknown target
run: rustup target add wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
with:
cache-targets: "false"
cache-on-failure: "true"
- name: Build
run: smdk build -p json-sql
- name: Pack
run: smdk publish -p json-sql --pack
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: smartmodule-artifact
path: crates/json-sql/.hub/json-sql-${{ github.event.inputs.smartmodule-version }}.ipkg
publish:
needs: build
uses: infinyon/fluvio/.github/workflows/smartmodule-publish.yml@master
with:
fail-fast: false
target_prod: ${{ inputs.target_prod }}
artifact-name: smartmodule-artifact
ipkg-file-name: json-sql-${{ github.event.inputs.smartmodule-version }}.ipkg
secrets: inherit