75 lines (73 loc) · 2.72 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
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-latest]
env:
pact_do_not_track: true
steps:
- uses: actions/checkout@v2
- name: Install stable Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: aarch64-apple-darwin
- name: Install LLVM
run: choco install -y llvm
if: runner.os == 'Windows'
- 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
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- 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
uses: actions/upload-artifact@v1
with:
name: release-artifacts
path: rust/target/artifacts
- name: Upload Release Assets
id: upload-release-asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: rust/target/artifacts/*
file_glob: true
tag: ${{ github.ref }}