diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ba72349..b068cb4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,10 @@ name: Main Workflow -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: env: CARGO_TERM_COLOR: always @@ -118,3 +122,35 @@ jobs: - uses: EmbarkStudios/cargo-deny-action@v1 with: command: check ${{ matrix.checks }} + + release: + name: release ${{ matrix.target }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - target: wasm32-wasi + archive: zip + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install 1.77.0 toolchain + uses: dtolnay/rust-toolchain@1.77.0 + + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 + + - name: Compile and release + uses: rust-build/rust-build.action@v1.4.5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RUSTFLAGS: "--cfg surrealdb_unstable" + RUSTDOCFLAGS: "--cfg surrealdb_unstable" + with: + RUSTTARGET: ${{ matrix.target }} + ARCHIVE_TYPES: ${{ matrix.archive }} + EXTRA_FILES: "readme.md LICENSE" + TOOLCHAIN_VERSION: stable diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d43c3ec..61e3ebb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,8 +16,8 @@ jobs: archive: zip - target: x86_64-unknown-linux-musl archive: tar.gz tar.xz tar.zst - - target: x86_64-apple-darwin - archive: zip + # - target: x86_64-apple-darwin + # archive: zip # - target: wasm32-wasi # archive: zip @@ -32,9 +32,11 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Compile and release - uses: rust-build/rust-build.action@v1.4.3 + uses: rust-build/rust-build.action@v1.4.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RUSTFLAGS: "--cfg surrealdb_unstable" + RUSTDOCFLAGS: "--cfg surrealdb_unstable" with: RUSTTARGET: ${{ matrix.target }} ARCHIVE_TYPES: ${{ matrix.archive }} diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index c610b66..ca770ff 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -2,6 +2,8 @@ name: Samples Workflow on: push: + branches: + - main paths-ignore: - "**.md" - "LICENSE"