Skip to content

Build, test and upload .pkg to S3 #597

Build, test and upload .pkg to S3

Build, test and upload .pkg to S3 #597

name: Build, test and upload .pkg to S3
# The scheduler runs at 9 am UTC every day.
on:
workflow_dispatch:
inputs:
ref_name:
required: true
type: string
workflow_call:
inputs:
ref_name:
required: true
type: string
schedule:
- cron: '0 9 * * *'
env:
GO111MODULE: on
jobs:
get-tag-name:
name: Get tag name
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.check-tag.outputs.tag }}
steps:
- name: Check tag from workflow input and github ref
id: check-tag
run: |
if [ -n "${{ inputs.ref_name }}" ]; then
tag=${{ inputs.ref_name }}
else
tag=${{ github.ref_name }}
fi
echo "tag=$tag" >> ${GITHUB_OUTPUT}
macos-aarch64-pkg-build:
needs: get-tag-name
uses: ./.github/workflows/build-pkg.yaml
secrets: inherit
with:
os: macos
arch: arm64
output_arch: aarch64
version: 14
tag: ${{ needs.get-tag-name.outputs.tag }}
macos-x86-64-pkg-build:
needs: get-tag-name
uses: ./.github/workflows/build-pkg.yaml
secrets: inherit
with:
os: macos
arch: amd64
output_arch: x86_64
version: 14
tag: ${{ needs.get-tag-name.outputs.tag }}
macos-aarch64-pkg-test:
strategy:
fail-fast: false
matrix:
version: [13, 14]
needs:
- get-tag-name
- macos-aarch64-pkg-build
uses: ./.github/workflows/test-pkg.yaml
secrets: inherit
with:
os: macos
arch: arm64
output_arch: aarch64
version: ${{ matrix.version }}
tag: ${{ needs.get-tag-name.outputs.tag }}
macos-x86-64-pkg-test:
strategy:
fail-fast: false
matrix:
version: [13, 14]
needs:
- get-tag-name
- macos-x86-64-pkg-build
uses: ./.github/workflows/test-pkg.yaml
secrets: inherit
with:
os: macos
arch: amd64
output_arch: x86_64
version: ${{ matrix.version }}
tag: ${{ needs.get-tag-name.outputs.tag }}