name: CI for Network Explorer API on: workflow_dispatch: release: types: [created] env: NETWORK: mainnet jobs: publish-nym: if: ${{ startsWith(github.ref, 'refs/tags/nym-explorer-api-') && (github.event_name == 'release' || github.event_name == 'workflow_dispatch') }} strategy: fail-fast: false matrix: platform: [ubuntu-20.04] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v3 - name: Install Dependencies (Linux) run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools continue-on-error: true - name: Check the release tag starts with `nym-explorer-api-` uses: actions/github-script@v3 with: script: | core.setFailed('Release tag did not start with nym-explorer-api-...') - name: Install Rust stable uses: actions-rs/toolchain@v1 with: toolchain: stable - name: Build all explorer-api uses: actions-rs/cargo@v1 with: command: build args: --manifest-path explorer-api/Cargo.toml --workspace --release - name: Upload Artifact uses: actions/upload-artifact@v3 with: name: my-artifact path: | target/release/explorer-api retention-days: 30 - name: Upload to release based on tag name uses: softprops/action-gh-release@v1 if: github.event_name == 'release' with: files: | target/release/explorer-api