Skip to content

Commit 76b39fa

Browse files
authored
Merge release-19.0.x to main (#304)
* Update Wasmtime to 18.0.0. (#300) * Bump Wasmtime version to 19.0.0. (#301) * Bump Wasmtime version to 19.0.1. (#303) * Bump Wasmtime version to 19.0.1. * Add a publish action for new tags. * Add release information to README.md. Closes #5.
1 parent 7e7dc89 commit 76b39fa

File tree

4 files changed

+68
-6
lines changed

4 files changed

+68
-6
lines changed

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# The purpose of this workflow is to publish the packages to NuGet
2+
# whenever a tag is created.
3+
4+
name: "Publish to NuGet"
5+
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
jobs:
12+
publish:
13+
name: "Publish NuGet Package"
14+
if: github.repository == 'bytecodealliance/wasmtime-dotnet'
15+
runs-on: ubuntu-latest
16+
env:
17+
DevBuild: 'false'
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Create NuGet package
21+
run: |
22+
cd src
23+
dotnet pack -c Release /p:Packing=true
24+
- name: Publish NuGet Package
25+
run: |
26+
cd src/bin/Release
27+
dotnet nuget push Wasmtime.${GITHUB_REF_NAME:1}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<PropertyGroup>
33
<DevBuild Condition="'$(DevBuild)'==''">true</DevBuild>
4-
<WasmtimeVersion Condition="'$(WasmtimeVersion)'==''">17.0.0</WasmtimeVersion>
4+
<WasmtimeVersion Condition="'$(WasmtimeVersion)'==''">19.0.1</WasmtimeVersion>
55
<WasmtimeDotnetVersion Condition="'$(WasmtimeDotnetVersion)'==''"></WasmtimeDotnetVersion>
66
<WasmtimePackageVersion Condition="'$(DevBuild)'=='true'">$(WasmtimeVersion)$(WasmtimeDotnetVersion)-dev</WasmtimePackageVersion>
77
<WasmtimePackageVersion Condition="'$(WasmtimePackageVersion)'==''">$(WasmtimeVersion)$(WasmtimeDotnetVersion)</WasmtimePackageVersion>

README.md

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ $ dotnet add package wasmtime
3232

3333
## Introduction
3434

35-
For this introduction, we'll be using a simple WebAssembly module that imports a `hello` function and exports a `run` function:
35+
For this introduction, we'll be using a simple WebAssembly module that imports
36+
a `hello` function and exports a `run` function:
3637

3738
```wat
3839
(module
@@ -83,7 +84,8 @@ var run = instance.GetAction("run")!;
8384
run();
8485
```
8586

86-
An `Engine` is created and then a WebAssembly module is loaded from a string in WebAssembly text format.
87+
An `Engine` is created and then a WebAssembly module is loaded from a string in
88+
WebAssembly text format.
8789

8890
A `Linker` defines a function called `hello` that simply prints a hello message.
8991

@@ -107,7 +109,8 @@ Use `dotnet` to build the repository:
107109
$ dotnet build Wasmtime.sln
108110
```
109111

110-
This will download the latest development snapshot of Wasmtime for your platform.
112+
This will download the latest development snapshot of Wasmtime for your
113+
platform.
111114

112115
### Testing
113116

@@ -128,4 +131,36 @@ $ dotnet pack Wasmtime.sln -c Release /p:Packing=true
128131

129132
This will create a `.nupkg` file in `src/bin/Release`.
130133

131-
By default, local builds will use a `-dev` suffix for the package to differentiate between official packages and development packages.
134+
By default, local builds will use a `-dev` suffix for the package to
135+
differentiate between official packages and development packages.
136+
137+
### Updating Wasmtime for a release
138+
139+
To update the Wasmtime library used for a new release, change `WasmtimeVersion`
140+
in `Directory.Build.props`:
141+
142+
```xml
143+
<WasmtimeVersion Condition="'$(WasmtimeVersion)'==''">$VERSION</WasmtimeVersion>
144+
```
145+
146+
Additionally, edit `Wasmtime.csproj` to change the `PackageReleaseNotes` to the
147+
new version:
148+
149+
```xml
150+
<PackageReleaseNotes>Update Wasmtime to $VERSION.</PackageReleaseNotes>
151+
```
152+
153+
### Publishing the Wasmtime .NET NuGet package
154+
155+
GitHub actions is used to automatically publish a package to NuGet when a tag
156+
is pushed to the repository.
157+
158+
To publish a new release, create a release in GitHub and add the relevant
159+
release notes.
160+
161+
Use a tag of the format `v$VERSION` where `$VERSION` matches the Wasmtime
162+
version used by the .NET package; ensure the tagged commit matches the last
163+
commit to make for the release.
164+
165+
When the release is published on GitHub, an action should automatically start
166+
to build and publish the package to NuGet.

src/Wasmtime.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<RepositoryUrl>https://github.com/bytecodealliance/wasmtime-dotnet</RepositoryUrl>
2121
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2222
<EmbedUntrackedSources>true</EmbedUntrackedSources>
23-
<PackageReleaseNotes>Update Wasmtime to 17.0.0.</PackageReleaseNotes>
23+
<PackageReleaseNotes>Update Wasmtime to 19.0.1.</PackageReleaseNotes>
2424
<Summary>A .NET API for Wasmtime, a standalone WebAssembly runtime</Summary>
2525
<PackageTags>webassembly, .net, wasm, wasmtime</PackageTags>
2626
<Title>Wasmtime</Title>

0 commit comments

Comments
 (0)