Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 25, 2023
2 parents ea7d818 + 5ce7285 commit 44f2463
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,26 @@ jobs:
cache-to: type=gha,mode=max

- name: Create draft release
# Triggered only on tag creation and if release does not exist
if: matrix.multiphase_eval=='true' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
run: |
set +e
if ! gh release view ${tag}; then
./.github/workflows/release_notes.sh ${tag} > release-notes.txt
gh release create ${tag} --draft --notes-file release-notes.txt --title ${GITHUB_REF#refs/tags/}
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- name: Push build artifact to release
# Triggered only on tag creation
if: matrix.multiphase_eval=='true' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
run: |
ls build
mv build/main.wasm build/coraza-proxy-wasm.wasm
tag="${GITHUB_REF#refs/tags/}"
zip -j build/coraza-proxy-wasm-${tag}.zip build/coraza-proxy-wasm.wasm
./.github/workflows/release_notes.sh ${tag} > release-notes.txt
gh release create ${tag} --draft --notes-file release-notes.txt --title ${GITHUB_REF#refs/tags/} ./build/coraza-proxy-wasm-${tag}.zip
gh release upload ${tag} ./build/coraza-proxy-wasm-${tag}.zip --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/stretchr/testify v1.8.0
github.com/tetratelabs/proxy-wasm-go-sdk v0.22.0
github.com/tidwall/gjson v1.17.0
github.com/wasilibs/nottinygc v0.6.0
github.com/wasilibs/nottinygc v0.7.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ github.com/wasilibs/go-libinjection v0.4.0 h1:dr1Y/kM/gmoA7eSfdf+CvCcmzwsz2jVYjN
github.com/wasilibs/go-libinjection v0.4.0/go.mod h1:zD7fNXKSaTKoSTmrfuP9Gc16alNEgwkZaHIeDDk3WWM=
github.com/wasilibs/go-re2 v1.4.0 h1:Jp6BM8G/zajgY1BCQUm3i7oGMdR1gA5EBv87wGd2ysc=
github.com/wasilibs/go-re2 v1.4.0/go.mod h1:hLzlKjEgON+17hWjikLx8hJBkikyjQH/lsqCy9t6tIY=
github.com/wasilibs/nottinygc v0.6.0 h1:RGfTXftUqTWXKGguB4DIxJX9xrxfHT0HYkWdgACwTWU=
github.com/wasilibs/nottinygc v0.6.0/go.mod h1:oDcIotskuYNMpqMF23l7Z8uzD4TC0WXHK8jetlB3HIo=
github.com/wasilibs/nottinygc v0.7.0 h1:x8PiLXMHiSx8v4MgyL8T4LEp0FqrPtqZDsveI9xiY3M=
github.com/wasilibs/nottinygc v0.7.0/go.mod h1:oDcIotskuYNMpqMF23l7Z8uzD4TC0WXHK8jetlB3HIo=
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
Expand Down
5 changes: 0 additions & 5 deletions init_tinygo.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ import (
// names and signatures of wasi-libc, used by TinyGo, not WASI ABI. Review these exports when either
// the minimum supported version of Envoy changes or the maximum version of TinyGo.

//export sched_yield
func sched_yield() int32 {
return 0
}

// fdopendir is re-exported to avoid TinyGo 0.28's import of wasi_snapshot_preview1.fd_readdir.
//
//export fdopendir
Expand Down
1 change: 1 addition & 0 deletions magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ func Build() error {

buildTags := []string{
"custommalloc", // https://github.com/wasilibs/nottinygc#usage
"nottinygc_envoy", // https://github.com/wasilibs/nottinygc#using-with-envoy
"no_fs_access", // https://github.com/corazawaf/coraza#build-tags
"memoize_builders", // https://github.com/corazawaf/coraza#build-tags
}
Expand Down

0 comments on commit 44f2463

Please sign in to comment.