fix: better idempotency #72
Workflow file for this run
This file contains hidden or 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: [master] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install mise | |
| uses: jdx/mise-action@v2 | |
| with: | |
| experimental: true | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install wasi-sdk | |
| run: | | |
| curl -fsSL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-x86_64-linux.tar.gz \ | |
| -o wasi-sdk.tar.gz | |
| tar xzf wasi-sdk.tar.gz | |
| echo "WASI_SDK_PATH=$PWD/wasi-sdk-25.0-x86_64-linux" >> "$GITHUB_ENV" | |
| - name: Run CI tasks | |
| run: mise run ci | |
| - name: Upload WASM artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plugin.wasm | |
| path: target/wasm32-unknown-unknown/release/dprint_plugin_java.wasm | |
| release: | |
| needs: [ci] | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: plugin.wasm | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dprint_plugin_java.wasm | |
| generate_release_notes: true |