Skip to content

Commit

Permalink
ci: fix workflow name for create-binary-artifact action, and check br…
Browse files Browse the repository at this point in the history
…eaking changes package dependent

Signed-off-by: simonsan <[email protected]>
  • Loading branch information
simonsan committed Sep 14, 2023
1 parent 6f38e4d commit c7e9506
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prebuilt-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
43 changes: 35 additions & 8 deletions .github/workflows/release-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,40 @@ 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_server

jobs:
breaking:
name: Test
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/release/rustic_server-*' ]]; then
echo "package=rustic_server" >> $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]
job:
- os: macos-latest
# - os: macos-latest # TODO: Need to generate fixtures for macOS first
- os: ubuntu-latest
- os: windows-latest
steps:
Expand All @@ -27,19 +51,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: breaking
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
Expand All @@ -48,5 +72,8 @@ jobs:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2

- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2
uses: obi1kenobi/cargo-semver-checks-action@e275dda72e250d4df5b564e969e1348d67fefa52 # v2
with:
package: ${{ needs.determine-package.outputs.package }}

0 comments on commit c7e9506

Please sign in to comment.