Fix publish ci #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
name: "Build" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install Tools | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y git llvm clang make lld curl | |
- name: "Install cargo-wasix" | |
run: | | |
cargo install cargo-wasix | |
- name: "Build" | |
run: | | |
cargo wasix build --release | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tantivy | |
path: target/wasm32-wasmer-wasi/release/tantivy.wasm | |
publish: | |
runs-on: ubuntu-22.04 | |
# if: ${{ github.ref == 'refs/heads/main' }} | |
needs: build | |
name: "Publish" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: tantivy | |
- name: Setup Wasmer | |
uses: wasmerio/setup-wasmer@v3.1 | |
- name: List contents | |
run: | | |
ls | |
- name: "Publish" | |
run: | | |
wasmer package publish -vvvv --registry="wasmer.io" --namespace wasmer --name tantivy --bump --non-interactive --token=${{ secrets.WASMER_CIUSER_PROD_TOKEN }} . | |