mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-03-15 14:30:49 +00:00
86 lines
2.1 KiB
YAML
86 lines
2.1 KiB
YAML
name: Publish snapshots
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
ref:
|
|
description: "GitHub ref to checkout to"
|
|
type: string
|
|
default: "master"
|
|
outputs:
|
|
version:
|
|
description: "snapshot version"
|
|
value: ${{ jobs.snapshot.outputs.version }}
|
|
|
|
jobs:
|
|
snapshot:
|
|
name: "Publish snapshot"
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
|
|
outputs:
|
|
version: "${{ steps.snapshot.outputs.version }}"
|
|
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: fluencelabs/sqlite-wasm-connector
|
|
ref: ${{ inputs.ref }}
|
|
|
|
- name: Import secrets
|
|
uses: hashicorp/vault-action@v2.5.0
|
|
with:
|
|
url: https://vault.fluence.dev
|
|
path: jwt/github
|
|
role: ci
|
|
method: jwt
|
|
jwtGithubAudience: "https://github.com/fluencelabs"
|
|
jwtTtl: 300
|
|
exportToken: false
|
|
secrets: |
|
|
kv/cargo-registry/users/ci token | CARGO_REGISTRIES_FLUENCE_TOKEN
|
|
|
|
- name: Setup Rust toolchain
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
|
|
- name: Download marine artifact
|
|
id: marine
|
|
uses: actions/download-artifact@v3
|
|
continue-on-error: true
|
|
with:
|
|
name: marine
|
|
path: ~/.local/bin
|
|
|
|
- name: Make marine executable
|
|
if: steps.marine.outcome == 'success'
|
|
run: chmod +x ~/.local/bin/marine
|
|
|
|
- name: Setup marine
|
|
if: steps.marine.outcome == 'failure'
|
|
uses: fluencelabs/setup-marine@v1
|
|
|
|
- name: Download sqlite-wasm
|
|
uses: actions/download-artifact@v3
|
|
continue-on-error: true
|
|
with:
|
|
name: sqlite-wasm
|
|
path: artifacts/
|
|
|
|
- name: Build
|
|
run: ./build.sh
|
|
|
|
- name: Generate snapshot version
|
|
id: version
|
|
uses: fluencelabs/github-actions/generate-snapshot-id@main
|
|
|
|
- name: Publish snapshot
|
|
id: snapshot
|
|
uses: fluencelabs/github-actions/cargo-publish-snapshot@main
|
|
with:
|
|
id: ${{ steps.version.outputs.id }}
|