Skip to content

Commit 0438241

Browse files
authored
Merge pull request #52 from bytecodealliance/publish-latest
Publish a `:latest` tag
2 parents b6d883b + 5642976 commit 0438241

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

.github/workflows/publish.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ jobs:
7777
- name: Normalize COMPONENT_NAME and Append .wasm
7878
run: echo "COMPONENT_NAME_UNDERSCORED=${COMPONENT_NAME//-/_}.wasm" >> $GITHUB_ENV
7979

80-
- name: Publish to GitHub Container Registry
80+
- name: Publish `:<version>` to GitHub Container Registry
8181
if: github.event_name != 'workflow_dispatch'
82-
id: publish
82+
id: publish_versioned
8383
uses: bytecodealliance/wkg-github-action@v5
8484
with:
8585
file: target/wasm32-wasip1/release/${{ env.COMPONENT_NAME_UNDERSCORED }}
@@ -90,6 +90,24 @@ jobs:
9090
homepage: ${{ env.COMPONENT_HOMEPAGE }}
9191
licenses: ${{ env.COMPONENT_LICENSES }}
9292

93-
- name: Sign the wasm component
93+
- name: Sign the versioned wasm component
9494
if: github.event_name != 'workflow_dispatch'
95-
run: cosign sign --yes ghcr.io/${{ env.IMAGE_NAME }}/${{ env.COMPONENT_NAME }}@${{ steps.publish.outputs.digest }}
95+
run: cosign sign --yes ghcr.io/${{ env.IMAGE_NAME }}/${{ env.COMPONENT_NAME }}@${{ steps.publish_versioned.outputs.digest }}
96+
97+
- name: Publish `:latest` release to GitHub Container Registry
98+
if: github.event_name != 'workflow_dispatch'
99+
id: publish_latest
100+
uses: bytecodealliance/wkg-github-action@v5
101+
with:
102+
file: target/wasm32-wasip1/release/${{ env.COMPONENT_NAME_UNDERSCORED }}
103+
oci-reference-without-tag: ghcr.io/${{ env.IMAGE_NAME }}/${{ env.COMPONENT_NAME }}
104+
version: latest
105+
description: ${{ env.COMPONENT_DESCRIPTION }}
106+
source: ${{ env.COMPONENT_SOURCE }}
107+
homepage: ${{ env.COMPONENT_HOMEPAGE }}
108+
licenses: ${{ env.COMPONENT_LICENSES }}
109+
110+
- name: Sign the latest wasm component
111+
if: github.event_name != 'workflow_dispatch'
112+
run: cosign sign --yes ghcr.io/${{ env.IMAGE_NAME }}/${{ env.COMPONENT_NAME }}@${{ steps.publish_latest.outputs.digest }}
113+

0 commit comments

Comments
 (0)