Bump wasmtime (prerelease) #2
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
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| name: Bump wasmtime (prerelease) | |
| on: | |
| schedule: | |
| - cron: 0 0 9 * * # 9th of each month, at 00:00 UTC | |
| workflow_dispatch: | |
| jobs: | |
| bump-wasmtime: | |
| name: Bump Wasmtime to prerelease | |
| runs-on: "ubuntu-22.04" | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Get latest Wasmtime release | |
| id: wasmtime-release | |
| run: | | |
| LAST_WASMTIME=$(git ls-remote https://github.com/bytecodealliance/wasmtime 'refs/heads/release-*' | awk '{print $2}' | sed -e "s/^refs\/heads\/release-//" | sort -V | tail -n1) | |
| echo "last_wasmtime=$LAST_WASMTIME" >>$GITHUB_OUTPUT | |
| - name: Bump Spin to latest Wasmtime release | |
| run: | | |
| sed -i -E "s/wasmtime = \{ version = \"[0-9]+[0-9.]*\"/wasmtime = \{ git = \"https:\/\/github.com\/bytecodealliance\/wasmtime\", branch = \"release-${{ steps.wasmtime-release.outputs.last_wasmtime }}\"/g" Cargo.toml | |
| sed -i -E "s/wasmtime-wasi = \{ version = \"[0-9]+[0-9.]*\"/wasmtime-wasi = \{ git = \"https:\/\/github.com\/bytecodealliance\/wasmtime\", branch = \"release-${{ steps.wasmtime-release.outputs.last_wasmtime }}\"/g" Cargo.toml | |
| sed -i -E "s/wasmtime-wasi-http = \{ version = \"[0-9]+[0-9.]*\"/wasmtime-wasi-http = \{ git = \"https:\/\/github.com\/bytecodealliance\/wasmtime\", branch = \"release-${{ steps.wasmtime-release.outputs.last_wasmtime }}\"/g" Cargo.toml | |
| cargo update | |
| # Import GPG key for signing commits | |
| - name: Import GPG key | |
| uses: crazy-max/ghaction-import-gpg@v6 | |
| with: | |
| gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.PASSPHRASE }} | |
| git_user_signingkey: true | |
| git_commit_gpgsign: true | |
| - name: Create Spin PR | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| token: ${{ secrets.SPIN_RUST_SDK_RELEASE_PAT }} | |
| branch: bump-wasmtime/prerelease-${{ steps.wasmtime-release.outputs.last_wasmtime }} | |
| commit-message: Bump Wasmtime to v${{ steps.wasmtime-release.outputs.last_wasmtime }} prerelease | |
| title: Bump Wasmtime to v${{ steps.wasmtime-release.outputs.last_wasmtime }} prerelease | |
| body: Bumps Wasmtime to v${{ steps.wasmtime-release.outputs.last_wasmtime }} prerelease | |
| committer: spinframeworkbot <202838904+spinframeworkbot@users.noreply.github.com> | |
| author: spinframeworkbot <202838904+spinframeworkbot@users.noreply.github.com> | |
| signoff: true | |
| draft: true | |
| delete-branch: true |