Pact FFI Library 0.4.25 #679
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release workflow | |
on: | |
release: | |
types: [published] | |
env: | |
RUST_BACKTRACE: "1" | |
RUST_LOG: "debug" | |
PACT_DO_NOT_TRACK: "true" | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-release: | |
name: build-release (${{ matrix.operating-system }}) | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ubuntu-20.04, windows-latest, macos-13] | |
env: | |
pact_do_not_track: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install stable Rust toolchain | |
if: runner.os == 'Linux' | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
targets: aarch64-unknown-linux-gnu,x86_64-unknown-linux-musl | |
- name: Install stable Rust toolchain | |
if: runner.os == 'Windows' | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
targets: aarch64-pc-windows-msvc,x86_64-pc-windows-msvc | |
- name: Install stable Rust toolchain | |
if: runner.os == 'MacOS' | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
targets: aarch64-apple-darwin,x86_64-apple-darwin | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: 14.1 | |
if: runner.os == 'MacOS' | |
- name: Set up QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
if: runner.os == 'Linux' | |
uses: docker/setup-buildx-action@v3 | |
- if: startsWith(github.ref, 'refs/tags/pact_mock_server_cli') && runner.os == 'Linux' | |
run: ./release-linux.sh | |
working-directory: rust/pact_mock_server_cli | |
- if: startsWith(github.ref, 'refs/tags/pact_mock_server_cli') && runner.os == 'Windows' | |
run: ./release-win.sh | |
shell: bash | |
working-directory: rust/pact_mock_server_cli | |
- if: startsWith(github.ref, 'refs/tags/pact_mock_server_cli') && runner.os == 'macOS' | |
run: ./release-osx.sh | |
shell: bash | |
working-directory: rust/pact_mock_server_cli | |
- if: startsWith(github.ref, 'refs/tags/pact_verifier_cli') && runner.os == 'Linux' | |
run: ./release-linux.sh | |
working-directory: rust/pact_verifier_cli | |
- if: startsWith(github.ref, 'refs/tags/pact_verifier_cli') && runner.os == 'Windows' | |
run: ./release-win.sh | |
shell: bash | |
working-directory: rust/pact_verifier_cli | |
- if: startsWith(github.ref, 'refs/tags/pact_verifier_cli') && runner.os == 'macOS' | |
run: ./release-osx.sh | |
shell: bash | |
working-directory: rust/pact_verifier_cli | |
- if: startsWith(github.ref, 'refs/tags/libpact_ffi') && runner.os == 'Linux' | |
run: ./release-linux.sh | |
working-directory: rust/pact_ffi | |
- if: startsWith(github.ref, 'refs/tags/libpact_ffi') && runner.os == 'Windows' | |
run: ./release-win.sh | |
shell: bash | |
working-directory: rust/pact_ffi | |
- if: startsWith(github.ref, 'refs/tags/libpact_ffi') && runner.os == 'macOS' | |
run: ./release-osx.sh | |
shell: bash | |
working-directory: rust/pact_ffi | |
- name: Upload Release Assets | |
if: startsWith(github.ref, 'refs/tags/libpact_ffi') || startsWith(github.ref, 'refs/tags/pact_verifier_cli') || startsWith(github.ref, 'refs/tags/pact_mock_server_cli') | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: rust/release_artifacts/* | |
file_glob: true | |
tag: ${{ github.ref }} |