-
Notifications
You must be signed in to change notification settings - Fork 46
81 lines (79 loc) · 3.33 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Release workflow
on:
release:
types: [published]
jobs:
build-release:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-20.04, windows-latest, macos-11]
env:
pact_do_not_track: true
steps:
- uses: actions/checkout@v3
- 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
- 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 the artifacts
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: actions/[email protected]
with:
name: release-artifacts
path: rust/release_artifacts
- 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/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: rust/release_artifacts/*
file_glob: true
tag: ${{ github.ref }}