|
| 1 | +# This workflow is used to publish sv2-apps crates to crates.io |
| 2 | +# the workflow tries to publish all the sv2-apps crates by running scripts/release-apps.sh |
| 3 | +# in case the `cargo publish` command fails, the script returns 1 and the entire workflow fails |
| 4 | +# the only exception is when the `cargo publish` command fails because the crate has already |
| 5 | +# been published, in which case the workflow continues |
| 6 | + |
| 7 | +name: Release Apps |
| 8 | + |
| 9 | +on: |
| 10 | + # Manually run by going to "Actions/Release" in Github and running the workflow |
| 11 | + workflow_dispatch: |
| 12 | + # every time a new release tag is created |
| 13 | + push: |
| 14 | + tags: |
| 15 | + - "v*.*.*" |
| 16 | + |
| 17 | +jobs: |
| 18 | + release-apps: |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - name: Checkout code |
| 22 | + uses: actions/checkout@v4 |
| 23 | + |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + |
| 26 | + - name: Install Rust (1.85) |
| 27 | + uses: dtolnay/rust-toolchain@1.85 |
| 28 | + |
| 29 | + - name: Login |
| 30 | + run: cargo login ${{ secrets.CRATES_IO_DEPLOY_KEY }} |
| 31 | + |
| 32 | + - name: Publish stratum-apps crate |
| 33 | + run: ./scripts/release-apps.sh stratum-apps |
| 34 | + |
| 35 | + - name: Publish bitcoin-core-sv2 crate |
| 36 | + run: ./scripts/release-apps.sh bitcoin-core-sv2 |
| 37 | + |
| 38 | + - name: Publish jd-client-sv2 crate |
| 39 | + run: ./scripts/release-apps.sh miner-apps/jd-client |
| 40 | + |
| 41 | + - name: Publish translator-sv2 crate |
| 42 | + run: ./scripts/release-apps.sh miner-apps/translator |
| 43 | + |
| 44 | + - name: Publish pool-sv2 crate |
| 45 | + run: ./scripts/release-apps.sh pool-apps/pool |
| 46 | + |
| 47 | + # todo: uncomment after https://github.com/stratum-mining/sv2-apps/issues/24 |
| 48 | + # - name: Publish jd-server crate |
| 49 | + # run: ./scripts/release-apps.sh jd-server |
| 50 | + |
| 51 | + - name: Publish integration-tests-sv2 crate |
| 52 | + run: ./scripts/release-apps.sh integration-tests |
| 53 | + |
| 54 | + |
0 commit comments