diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index a8f0df8..c20643d 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -1,5 +1,9 @@ name: Continuous Delivery +permissions: + pull-requests: write + contents: write + on: push: branches: @@ -8,7 +12,28 @@ env: CARGO_TERM_COLOR: always jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Clone repo + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + with: + target: wasm32-wasi + + - name: Run Release PR + uses: MarcoIeni/release-plz-action@v0.5 + with: + command: release-pr + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + build: + needs: release strategy: matrix: os: [ ubuntu-latest, windows-latest, macos-latest ] diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2a585eb..b9ad06a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,6 +23,9 @@ jobs: target: wasm32-wasi components: rustfmt, clippy + - name: Cache dependencies + uses: Swatinem/rust-cache@v2.2.1 + - name: Run cargo-audit binary crate uses: rustsec/audit-check@v1.4.1 with: @@ -34,25 +37,3 @@ jobs: - name: Run Clippy run: cargo clippy --all-targets --all-features - release: - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' - steps: - - name: Clone repo - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Setup Rust - uses: dtolnay/rust-toolchain@stable - with: - target: wasm32-wasi - components: rustfmt, clippy - - - name: Run Release PR - uses: MarcoIeni/release-plz-action@v0.5 - with: - command: release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} \ No newline at end of file