v0.0.11 #32
Workflow file for this run
This file contains hidden or 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
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 | ||
runs-on: ${{ matrix.dist.runner }} | ||
env: | ||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | ||
Check failure on line 57 in .github/workflows/publish.yml
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "true" | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- uses: nttld/setup-ndk@v1 | ||
if: matrix.dist.profile == 'android-x86_64' || matrix.dist.profile == 'android-armv8' | ||
id: setup-ndk | ||
with: | ||
ndk-version: r26d | ||
- name: Debug ANDROID_NDK_HOME | ||
run: echo $ANDROID_NDK_HOME | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
poetry install | ||
- name: Compile | ||
run: | | ||
conan install . -pr:h profiles/${{ matrix.dist.profile }} | ||
conan build . -pr:h profiles/${{ matrix.dist.profile }} | ||
# - 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 |