Skip to content

Merge pull request #13 from asteurer/actions #13

Merge pull request #13 from asteurer/actions

Merge pull request #13 from asteurer/actions #13

name: Build and Push Azure Client Package
on:
push:
branches:
- main
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup spin
uses: fermyon/actions/spin/setup@v1
with:
github_token: ${{ github.token }}
- name: install go
uses: actions/setup-go@v3
with:
go-version: "1.22"
- name: install tinygo
uses: rajatjindal/setup-actions/tinygo@v0.0.1
with:
version: "v0.32.0"
- name: cofiguring rust toolchain version
run: rustup toolchain install stable --profile minimal
- name: cache cargo registry and git index
id: cache-cargo-registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('install-script.sh') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: cache cargo binaries
id: cache-cargo-bin
uses: actions/cache@v3
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('install-script.sh') }}
restore-keys: |
${{ runner.os }}-cargo-bin-
- name: install wkg
run: cargo install --git https://github.com/bytecodealliance/wasm-pkg-tools wkg --locked --config net.git-fetch-with-cli=true --force
if: steps.cache-cargo-bin.outputs.cache-hit != 'true'
- name: build spinapp
run: spin build
- name: login to GitHub container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: push package
run: RELEASE_VERSION=$(yq '.application.version' spin.toml) && wkg oci push ghcr.io/fermyon/wasm-pkg/fermyon-experimental/azure-client:$RELEASE_VERSION main.wasm