Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish a Wasm Component to GitHub Artifacts
name: Build and publish a Wasm Component to GitHub Artifacts

on:
push:
Expand All @@ -9,6 +9,7 @@ on:
env:
IMAGE_NAME: ${{ github.repository }}
COMPONENT_NAME: rust-wasi-hello
CARGO_COMPONENT_VERSION: "0.16.0"

jobs:
publish:
Expand All @@ -21,13 +22,15 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.actor }}/{{ env.COMPONENT_NAME }}
tags: |
type=semver,pattern={{version}}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -52,12 +55,14 @@ jobs:
${{ runner.os }}-

- if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }}
name: Run install script
name: Install build dependencies
continue-on-error: false
run: bash scripts/install.sh
run: |
cargo install cargo-component --force --version {{ env.CARGO_COMPONENT_VERSION }}
cargo install wkg --force

- name: Run build script
run: bash scripts/build.sh
- name: Build the component
run: cargo component build --release

- name: Publish to GitHub Container Registry
id: publish
Expand Down
4 changes: 0 additions & 4 deletions scripts/build.sh

This file was deleted.

7 changes: 0 additions & 7 deletions scripts/install.sh

This file was deleted.

16 changes: 0 additions & 16 deletions scripts/publish.sh

This file was deleted.