Skip to content

Commit 594884e

Browse files
authored
Merge pull request #47 from bytecodealliance/fixes-publish
normalize component name for publishing
2 parents 8b7496d + 751ba12 commit 594884e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/publish.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,15 @@ jobs:
7575
- name: Build the component
7676
run: cargo component build --release
7777

78+
- name: Normalize COMPONENT_NAME and Append .wasm
79+
run: echo "COMPONENT_NAME_UNDERSCORED=${COMPONENT_NAME//-/_}.wasm" >> $GITHUB_ENV
80+
7881
- name: Publish to GitHub Container Registry
7982
if: github.event_name != 'workflow_dispatch'
8083
id: publish
8184
uses: bytecodealliance/wkg-github-action@v5
8285
with:
83-
file: target/wasm32-wasip1/release/${{ env.COMPONENT_NAME }}
86+
file: target/wasm32-wasip1/release/${{ env.COMPONENT_NAME_UNDERSCORED }}
8487
oci-reference-without-tag: ghcr.io/${{ env.IMAGE_NAME }}/${{ env.COMPONENT_NAME }}
8588
version: ${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
8689
description: ${{ env.COMPONENT_DESCRIPTION }}

0 commit comments

Comments
 (0)