Bump wit-bindgen from 0.49.0 to 0.50.0 #42
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v[0-9]+\.[0-9]+\.[0-9]+-?**' | |
| pull_request: {} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Install cargo binstall | |
| uses: cargo-bins/cargo-binstall@main | |
| - name: Install wkg | |
| run: cargo binstall --force wkg | |
| - name: Install cargo-component | |
| run: cargo binstall --force cargo-component | |
| - name: Install wasm-tools | |
| run: cargo binstall --force wasm-tools | |
| - name: Fetch wit | |
| run: make wit | |
| - name: Check for drift in generated wit | |
| run: git diff --exit-code . | |
| - name: Build components | |
| run: make components | |
| - name: Collect components.tar | |
| run: tar -cvf ../components.tar *.wasm* | |
| working-directory: ./lib | |
| - name: Upload components.tar | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: components.tar | |
| path: components.tar | |
| retention-days: 7 | |
| - name: Capture WIT | |
| working-directory: ./lib | |
| run: | | |
| for component in *.wasm ; do | |
| echo "::group::${component}" | |
| wasm-tools component wit "${component}" | |
| echo "::endgroup::" | |
| done | |
| publish: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: | |
| - build | |
| permissions: | |
| contents: write | |
| packages: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Install cargo binstall | |
| uses: cargo-bins/cargo-binstall@main | |
| - name: Install wkg | |
| run: cargo binstall --force wkg | |
| - name: Get the version | |
| id: get_version | |
| run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
| - name: Download components.tar | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: components.tar | |
| - name: Extract components | |
| run: tar -xvf components.tar -C lib | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish components to gchr.io | |
| run: make publish | |
| env: | |
| REPOSITORY: "ghcr.io/${{ github.repository }}" | |
| VERSION: "${{ steps.get_version.outputs.VERSION }}" | |
| - name: Draft GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| files: | | |
| lib/*.wasm | |
| components.tar | |
| fail_on_unmatched_files: true | |
| token: ${{ secrets.GITHUB_TOKEN }} |