mirror of
https://github.com/rustic-rs/rustic.git
synced 2025-10-26 11:18:51 +00:00
ci: make release checks for breaking changes run package dependent
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
This commit is contained in:
parent
49465a7107
commit
99759eb4ff
2
.github/workflows/nightly.yml
vendored
2
.github/workflows/nightly.yml
vendored
@ -86,7 +86,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0 # fetch all history so that git describe works
|
||||
- name: Create binary artifact
|
||||
uses: rustic-rs/create-binary-artifact@main # dev
|
||||
uses: rustic-rs/create-binary-artifact-action@main # dev
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
target: ${{ matrix.job.target }}
|
||||
|
||||
2
.github/workflows/prebuilt-pr.yml
vendored
2
.github/workflows/prebuilt-pr.yml
vendored
@ -83,7 +83,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0 # fetch all history so that git describe works
|
||||
- name: Create binary artifact
|
||||
uses: rustic-rs/create-binary-artifact@main # dev
|
||||
uses: rustic-rs/create-binary-artifact-action@main # dev
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
target: ${{ matrix.job.target }}
|
||||
|
||||
2
.github/workflows/release-cd.yml
vendored
2
.github/workflows/release-cd.yml
vendored
@ -77,7 +77,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0 # fetch all history so that git describe works
|
||||
- name: Create binary artifact
|
||||
uses: rustic-rs/create-binary-artifact@main # dev
|
||||
uses: rustic-rs/create-binary-artifact-action@main # dev
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
target: ${{ matrix.job.target }}
|
||||
|
||||
38
.github/workflows/release-ci.yml
vendored
38
.github/workflows/release-ci.yml
vendored
@ -4,11 +4,39 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- release/*
|
||||
# TODO!: We might want to do it manually? Not sure.
|
||||
# workflow_dispatch:
|
||||
# inputs:
|
||||
# crate:
|
||||
# description: Crate to release
|
||||
# required: true
|
||||
# type: choice
|
||||
# options:
|
||||
# - rustic
|
||||
# - rustic_core
|
||||
# - rustic_testing
|
||||
|
||||
jobs:
|
||||
determine-package:
|
||||
name: Determine package to release
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
package: ${{ steps.determine-package-name.outputs.package }}
|
||||
steps:
|
||||
- name: Determine package
|
||||
id: determine-package-name
|
||||
run: |
|
||||
if [[ ${{ github.ref }} == 'refs/releases/rustic_core-*' ]]; then
|
||||
echo "package=rustic_core" >> $GITHUB_OUTPUT
|
||||
elif [[ ${{ github.ref }} == 'refs/releases/rustic-*' ]]; then
|
||||
echo "package=rustic" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
breaking-cli:
|
||||
name: Check breaking CLI changes
|
||||
runs-on: ${{ matrix.job.os }}
|
||||
needs: determine-package
|
||||
if: ${{ needs.determine-package.outputs.package }} == 'rustic'
|
||||
strategy:
|
||||
matrix:
|
||||
rust: [stable]
|
||||
@ -27,18 +55,19 @@ jobs:
|
||||
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1
|
||||
with:
|
||||
command: test
|
||||
args: -r --all-targets --all-features --workspace -- --ignored
|
||||
args: -r --all-targets --all-features --workspace -p ${{ needs.determine-package.outputs.package }} -- --ignored
|
||||
|
||||
semver-check:
|
||||
name: Check SemVer
|
||||
runs-on: ubuntu-latest
|
||||
needs: determine-package
|
||||
strategy:
|
||||
matrix:
|
||||
rust: [stable]
|
||||
job:
|
||||
- os: ubuntu-latest
|
||||
- os: windows-latest
|
||||
- os: macos-latest
|
||||
# - os: windows-latest # Panics
|
||||
# - os: macos-latest # Panics
|
||||
steps:
|
||||
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
||||
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1
|
||||
@ -47,5 +76,8 @@ jobs:
|
||||
toolchain: stable
|
||||
override: true
|
||||
- uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2
|
||||
|
||||
- name: Check semver
|
||||
uses: obi1kenobi/cargo-semver-checks-action@e275dda72e250d4df5b564e969e1348d67fefa52 # v2
|
||||
with:
|
||||
package: ${{ needs.determine-package.outputs.package }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user