Skip to content

Commit 33bdbe8

Browse files
committed
initial commit
0 parents  commit 33bdbe8

File tree

10 files changed

+3953
-0
lines changed

10 files changed

+3953
-0
lines changed

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[build]
2+
target = "wasm32-wasi"

.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
name: Release
3+
permissions: write-all
4+
on:
5+
push:
6+
tags:
7+
- 'v*.*.*'
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-release:
12+
name: build-release
13+
runs-on: ubuntu-latest
14+
env:
15+
RUST_BACKTRACE: 1
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Install Rust
23+
uses: actions-rs/toolchain@v1
24+
with:
25+
toolchain: '1.76.0'
26+
profile: minimal
27+
override: true
28+
target: wasm32-wasi
29+
30+
- name: Build release binary
31+
run: cargo build --release
32+
33+
- name: Create release
34+
id: create_release
35+
uses: actions/create-release@v1
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
with:
39+
tag_name: ${{ github.event_name == 'workflow_dispatch' && '' || github.ref }}
40+
release_name: Release ${{ github.event_name == 'workflow_dispatch' && 'main' || github.ref }}
41+
draft: true
42+
prerelease: false
43+
44+
- name: Upload wasm file to release
45+
uses: actions/[email protected]
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
with:
49+
upload_url: ${{ steps.create_release.outputs.upload_url }}
50+
asset_path: ./target/wasm32-wasi/release/develop-rust-plugin.wasm
51+
asset_name: develop-rust-plugin.wasm
52+
asset_content_type: application/octet-stream

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

0 commit comments

Comments
 (0)