Add libFFI and OpenSSL 1.1 instructions. #2
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
# Run this Action on creating a new tag matching "<library>-<version>-<build>" | |
# e.g., foobar-1.2.3-1 | |
name: Release build | |
on: | |
push: | |
tags: | |
- '*-*-*' | |
jobs: | |
build: | |
runs-on: macOS-latest | |
outputs: | |
PACKAGE_NAME: ${{ steps.build-vars.outputs.PACKAGE_NAME }} | |
PACKAGE_VERSION: ${{ steps.build-vars.outputs.PACKAGE_VERSION }} | |
BUILD_NUMBER: ${{ steps.build-vars.outputs.BUILD_NUMBER }} | |
strategy: | |
matrix: | |
target: ['iOS', 'tvOS', 'watchOS'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set build variables | |
id: build-vars | |
env: | |
TAG_NAME: ${{ github.ref }} | |
run: | | |
export TAG=$(basename $TAG_NAME) | |
echo "TAG=${TAG}" | |
export PACKAGE_NAME_VERSION="${TAG%-*}" | |
export PACKAGE_NAME="${PACKAGE_NAME_VERSION%-*}" | |
export PACKAGE_VERSION="${PACKAGE_NAME_VERSION#*-}" | |
export BUILD_NUMBER="${TAG#*-*-}" | |
echo "PACKAGE_NAME=${PACKAGE_NAME}" | |
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" | |
echo "BUILD_NUMBER=${BUILD_NUMBER}" | |
echo "PACKAGE_NAME=${PACKAGE_NAME}" >> ${GITHUB_OUTPUT} | |
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> ${GITHUB_OUTPUT} | |
echo "BUILD_NUMBER=${BUILD_NUMBER}" >> ${GITHUB_OUTPUT} | |
- name: Set up Python | |
uses: actions/setup-python@v4.7.1 | |
with: | |
python-version: "3.X" | |
- name: Build ${{ matrix.target }} | |
run: | | |
# Do the build for the requested target. | |
make ${{ steps.build-vars.outputs.PACKAGE_NAME }}-${{ matrix.target }} $(echo "${{ steps.build-vars.outputs.PACKAGE_NAME }}" | tr 'a-z' 'A-Z')_VERSION=${{ steps.build-vars.outputs.PACKAGE_VERSION }} BUILD_NUMBER=${{ steps.build-vars.outputs.BUILD_NUMBER }} | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: dist | |
path: "dist" | |
if-no-files-found: error | |
make-release: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Get build artifacts | |
uses: actions/download-artifact@v3.0.2 | |
with: | |
name: dist | |
path: dist | |
- name: Create Release | |
uses: ncipollo/release-action@v1.13.0 | |
with: | |
name: ${{ needs.build.outputs.PACKAGE_NAME }} v${{ needs.build.outputs.PACKAGE_VERSION }} (build ${{ needs.build.outputs.BUILD_NUMBER }}) | |
draft: true | |
body: | | |
Build ${{ needs.build.outputs.BUILD_NUMBER }} of ${{ needs.build.outputs.PACKAGE_NAME }} v${{ needs.build.outputs.PACKAGE_VERSION }}. | |
artifacts: "dist/*" |