From 04fa3930f45bbff050f97e6d45e0ddcbb98bde85 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Wed, 1 Nov 2023 16:47:15 +0200 Subject: [PATCH] publish from GitHub release page (#2645) * space to breath * publish from GitHub Releases * Apply suggestions from code review --- .github/workflows/publish.yml | 21 +++++++++++++++++++++ CONTRIBUTING.md | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000000..5aa52860f4 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,21 @@ +# To trigger this: +# - go to Actions > Publish +# - click the Run Workflow dropdown in the top-right +name: Publish +on: workflow_dispatch +env: + CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} +jobs: + cargo-publish: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v3 + - name: Install stable toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + - name: Publish bindgen (lib) + run: cargo publish --package bindgen --token ${CRATES_TOKEN} + - name: Publish bindgen-cli + run: cargo publish --package bindgen-cli --token ${CRATES_TOKEN} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 25cad1e9bd..58d47a41e9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -564,8 +564,9 @@ important fix) you can skip this. Once you're in the right branch, do: ``` -cargo release [patch|minor] --execute +cargo release [patch|minor] --no-publish --execute ``` + This does the following: - Tag (`git tag`) the HEAD commit