Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish bitcoin-dogecoin crate to crates.io

on:
workflow_dispatch:
inputs:
dryRun:
description: "Run cargo publish with --dry-run"
required: false
type: boolean

jobs:
publish-bitcoin-dogecoin:
name: Publish bitcoin-dogecoin
runs-on: ubuntu-latest

environment: release

permissions:
id-token: write # Required for OIDC token exchange

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Authenticate with crates.io
id: auth
uses: rust-lang/crates-io-auth-action@v1

- run: echo "Preparing to cargo publish ${{ github.ref_name }}."

- name: Publish bitcoin-dogecoin to crates.io
run: |
if [ "${{ inputs.dryRun }}" = "true" ]; then
cargo publish -p bitcoin-dogecoin --dry-run
else
cargo publish -p bitcoin-dogecoin
fi
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}