Mainnet 1.7.0 #39
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: Publish OpenRPC document | |
| # This workflow only works with the 'on.release'-trigger. | |
| # On.release ensures a new release exists when artifacts from this workflow are being uploaded to the release. | |
| # On.tags can get triggered without the creation of a new release thus causing uploads to fail. | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| build_release_binary_and_publish_document: | |
| name: Build nimiq-rpc-schema with release flag | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Build binary in release mode | |
| run: | | |
| cargo build --release --bin nimiq-rpc-schema | |
| - name: Get release information | |
| id: get_release | |
| uses: bruceadams/get-release@v1.3.2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run nimiq-rpc-schema and save JSON output | |
| run: | | |
| cargo run --release --bin nimiq-rpc-schema -- -o ${{ steps.get_release.outputs.tag_name }} > openrpc-document.json | |
| - name: Upload OpenRPC document to latest release | |
| uses: JasonEtco/upload-to-release@v0.1.1 | |
| with: | |
| args: openrpc-document.json application/json | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |