From a822305e2e4206e2ca6018760da8476bbf5797b8 Mon Sep 17 00:00:00 2001 From: Luiz Irber Date: Sat, 6 May 2023 19:09:02 +0000 Subject: [PATCH] chore: set up release-please (#4) Based on https://github.com/rust-bio/rust-bio/pull/436 and https://github.com/google-github-actions/release-please-action Bit of a trial for https://github.com/sourmash-bio/sourmash/issues/2425 --- .github/workflows/conventional-prs.yml | 16 +++++++++++ .github/workflows/release-please.yml | 40 ++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/workflows/conventional-prs.yml create mode 100644 .github/workflows/release-please.yml diff --git a/.github/workflows/conventional-prs.yml b/.github/workflows/conventional-prs.yml new file mode 100644 index 0000000..d926109 --- /dev/null +++ b/.github/workflows/conventional-prs.yml @@ -0,0 +1,16 @@ +name: PR +on: + pull_request_target: + types: + - opened + - reopened + - edited + - synchronize + +jobs: + title-format: + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v3.4.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..407d95b --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,40 @@ +on: + push: + branches: + - latest + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + release-please: + if: github.repository_owner == 'sourmash-bio' + runs-on: ubuntu-latest + steps: + + - uses: GoogleCloudPlatform/release-please-action@v2 + id: release + with: + release-type: rust + package-name: mastiff-client + + - uses: actions/checkout@v2 + if: ${{ steps.release.outputs.release_created }} + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + if: ${{ steps.release.outputs.release_created }} + with: + toolchain: stable + override: true + + - name: Install system dependencies + if: ${{ steps.release.outputs.release_created }} + run: | + sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev + + - uses: Swatinem/rust-cache@v1.3.0 + if: ${{ steps.release.outputs.release_created }}