|
77 | 77 | - name: Normalize COMPONENT_NAME and Append .wasm
|
78 | 78 | run: echo "COMPONENT_NAME_UNDERSCORED=${COMPONENT_NAME//-/_}.wasm" >> $GITHUB_ENV
|
79 | 79 |
|
80 |
| - - name: Publish to GitHub Container Registry |
| 80 | + - name: Publish `:<version>` to GitHub Container Registry |
81 | 81 | if: github.event_name != 'workflow_dispatch'
|
82 |
| - id: publish |
| 82 | + id: publish_versioned |
83 | 83 | uses: bytecodealliance/wkg-github-action@v5
|
84 | 84 | with:
|
85 | 85 | file: target/wasm32-wasip1/release/${{ env.COMPONENT_NAME_UNDERSCORED }}
|
|
90 | 90 | homepage: ${{ env.COMPONENT_HOMEPAGE }}
|
91 | 91 | licenses: ${{ env.COMPONENT_LICENSES }}
|
92 | 92 |
|
93 |
| - - name: Sign the wasm component |
| 93 | + - name: Sign the versioned wasm component |
94 | 94 | 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