diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 99f09554..dba00b96 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,9 +3,31 @@ name: release on: push: tags: - - "v*.*.*" + - 'v*.*.*' jobs: + crate: + name: crate + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + run: | + rustup toolchain install 1.72 \ + --profile minimal \ + --target wasm32-unknown-unknown \ + --no-self-update + + - name: Cache dependencies + uses: Swatinem/rust-cache@v2 + + - name: Install Deps + run: make install-prod + + - name: Publish hpl-interface + run: cargo publish --token ${{ secrets.CRATES_TOKEN }} --package hpl-interface + artifact: permissions: contents: write @@ -42,10 +64,7 @@ jobs: env: ARTIFACT_NAME: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip - - name: Publish hpl-interface - run: cargo publish --token ${{ secrets.CRATES_TOKEN }} --package hpl-interface - - - name: Release + - name: Release Artifact uses: softprops/action-gh-release@v1 with: files: | diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6a4c00a6..1c1fec5c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -2,15 +2,19 @@ name: test on: pull_request: + paths: + - 'contracts/**' + - 'packages/**' + - 'Cargo.toml' push: branches: - - "main" + - 'main' jobs: unit-test: strategy: fail-fast: true - + name: unit-test runs-on: ubuntu-latest steps: @@ -39,11 +43,11 @@ jobs: CARGO_TERM_COLOR: always steps: - uses: actions/checkout@v4 - + - uses: actions/setup-go@v4 with: go-version: '1.21' - + - name: Install Rust run: | rustup toolchain install 1.72 \