-
Notifications
You must be signed in to change notification settings - Fork 309
59 lines (53 loc) · 3.88 KB
/
Copy pathbump-wasmtime.yml
File metadata and controls
59 lines (53 loc) · 3.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Bump wasmtime (prerelease)
on:
schedule:
- cron: 0 12 5 * * # 12 hours after Wasmtime branch schedule
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 = \"[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 = \"[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
sed -i -E "s/wasmtime-wasi-http = \"[0-9]+[0-9.]*\"/wasmtime-wasi = \{ git = \"https:\/\/github.com\/bytecodealliance\/wasmtime\", branch = \"release-${{ steps.wasmtime-release.outputs.last_wasmtime }}\" }/g" Cargo.toml
cargo update wasmtime wasmtime-wasi wasmtime-wasi-http
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" examples/spin-timer/Cargo.toml
sed -i -E "s/wasmtime = \"[0-9]+[0-9.]*\"/wasmtime = \{ git = \"https:\/\/github.com\/bytecodealliance\/wasmtime\", branch = \"release-${{ steps.wasmtime-release.outputs.last_wasmtime }}\" }/g" examples/spin-timer/Cargo.toml
cargo update wasmtime wasmtime-wasi wasmtime-wasi-http --manifest-path examples/spin-timer/Cargo.toml
# 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.SPINFRAMEWORKBOT_PR_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