Skip to content

debug2

debug2 #54

Workflow file for this run

name: Publish 🚀
permissions:
contents: write
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*" # tag pattern on pub.dev: 'v{{version}}'
jobs:
version:
name: Version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Extract the binary.version
- run: echo "BINARY_VER=$(cat binary.version)" >> $GITHUB_ENV
# Extract the version from CMakeLists.txt
- run: echo "CMAKE_VER=$(grep -oP 'VERSION\s\K[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt)" >> $GITHUB_ENV
# Extract the version from pubspec.yaml
- run: echo "PUB_VER=$(grep -oP 'version:\s\K[0-9]+\.[0-9]+\.[0-9]+' dart/pubspec.yaml)" >> $GITHUB_ENV
# Compare the versions in env to github.ref_name
- run: |
if [[ "${{ env.CMAKE_VER }}" == "${{ env.PUB_VER }}" ]] && \
[[ "${{ env.CMAKE_VER }}" == "${{ env.BINARY_VER }}" ]] && \
[[ "${{ env.CMAKE_VER }}" == "${{ github.ref_name }}" ]]; then
echo "All variables are equal."
else
echo "Variables differ:"
echo "BINARY_VER: ${{ env.BINARY_VER }}"
echo "CMAKE_VER: ${{ env.CMAKE_VER }}"
echo "PUB_VER: ${{ env.PUB_VER }}"
echo "GITHUB_REF_NAME: ${{ github.ref_name }}"
fi
binary:
name: Binary
needs: version
strategy:
matrix:
dist:
- profile: linux-x64
runner: ubuntu-latest
release: linux-x64
- profile: macos-arm64
runner: macos-latest
release: macos-arm64
- profile: android-x86_64
runner: ubuntu-latest
release: android-x86_64
- profile: android-armv8
runner: ubuntu-latest
release: android-arm64-v8a
fail-fast: false
runs-on: ${{ matrix.dist.runner }}
steps:
- uses: actions/checkout@v4
with:
submodules: "true"
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- uses: nttld/setup-ndk@v1
if: startsWith(matrix.dist.profile, 'android')
id: setup-ndk
with:
ndk-version: r26d
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config virtualenvs.in-project true
poetry install -v
source .venv/bin/activate
conan profile detect
- name: Compile
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path || '' }}
id: compile
run: |
source .venv/bin/activate
if ${{ startsWith(matrix.dist.profile, 'android') }};
then
conan create . \
--profile:host profiles/${{ matrix.dist.profile }} \
--conf:host tools.android:ndk_path=$ANDROID_NDK_HOME \
--options:host '&:ci=True'
else
conan create . \
--options:host ci=True
fi
- name: Package
id: package
run: |
source .venv/bin/activate
echo ${{ steps.compile.outputs.conan_package_path }}
ls ${HOME}/.conan2/p/b/
# - uses: softprops/action-gh-release@v2
# name: GitHub Release
# with:
# files: ${{ steps.dist.outputs.tar_gz_path }}
# draft: true
# prerelease: false
# publish:
# name: pub.dev
# needs: [version, binary]
# runs-on: ubuntu-latest
# container:
# image: ghcr.io/jeffmur/fhel:builder
# permissions:
# id-token: write # Required for authentication using OIDC
# environment:
# name: pub.dev
# url: https://pub.dev/packages/fhel
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: "true"
# - uses: dart-lang/setup-dart@v1
# - run: make publish-ci