-
Notifications
You must be signed in to change notification settings - Fork 99
65 lines (55 loc) · 1.93 KB
/
macos_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
name: MacOS Release
# This workflow is triggered on pushes to the repository. This is machine tests that everything is set for a release
# build. The binaries produced here can be used to make the release
on: [push]
jobs:
release_built:
name: Build pkg from source
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-14-large
arch: amd
- os: macos-latest-xlarge
arch: arm
env:
RELEASE_VERSION: 2.7.0
SO_VERSION: 2
steps:
- name: checkout
uses: actions/checkout@v4
- name: Install prerequisites
run: |
set -x
brew update
brew install check gengetopt help2man opensc zlib
brew reinstall openssl@3
- name: Build MacOS binaries
env:
ARCH: ${{ matrix.arch }}
run: |
set -x
export INSTALL_PREFIX=/usr/local
./resources/macos/make_release_binaries.sh $ARCH $RELEASE_VERSION $SO_VERSION $INSTALL_PREFIX
mkdir $GITHUB_WORKSPACE/artifact
mv resources/macos/yubico-piv-tool-$RELEASE_VERSION-mac-$ARCH.zip $GITHUB_WORKSPACE/artifact/
- name: Create installer
env:
ARCH: ${{ matrix.arch }}
run: |
set -x
./resources/macos/make_installer.sh $RELEASE_VERSION $GITHUB_WORKSPACE/artifact/yubico-piv-tool-$RELEASE_VERSION-mac-$ARCH.zip
- name: Install yubico-piv-tool from installer
run: |
set -x
cd resources/macos
sudo installer -verbose -store -pkg $PWD/yubico-piv-tool-$RELEASE_VERSION.pkg -target /
yubico-piv-tool --help | grep "Usage: yubico-piv-tool"
cp yubico-piv-tool-$RELEASE_VERSION.pkg $GITHUB_WORKSPACE/artifact/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: yubico-piv-tool-mac-${{ matrix.arch }}64
path: artifact