Skip to content

upgrade dart dependencies #621

upgrade dart dependencies

upgrade dart dependencies #621

Workflow file for this run

---
name: Create Release
on:
workflow_dispatch:
pull_request:
branches: [main]
types: [closed]
jobs:
build:
# See: .github/workflows/create_release_pr.yaml
if: ${{ github.head_ref == 'prepare_for_release' && github.event.pull_request.merged == true }}
env:
OUTPUT_DIR: libedax_output
PUBLISH_DIR: dst
runs-on: ${{ matrix.runner_os }}
timeout-minutes: 10
outputs:
version: ${{ steps.get_version.outputs.version }}
strategy:
matrix:
target_os: ["Linux", "Windows", "macOS", "iOS"]
include:
- target_os: Linux
runner_os: ubuntu-latest
libedax_build_command: make libbuild ARCH=x64 COMP=gcc OS=linux
- target_os: Windows
runner_os: windows-latest
libedax_build_command: make libbuild ARCH=x64 COMP=gcc OS=windows
- target_os: macOS
runner_os: macos-latest
libedax_build_command: make universal_osx_libbuild
- target_os: iOS
runner_os: macos-latest
libedax_build_command: make universal_ios_libbuild
steps:
- uses: actions/checkout@v6
- uses: dart-lang/setup-dart@v1
- name: get current version
id: get_version
shell: bash # for windows
run: |
VERSION=$(dart pub deps --style compact | grep "libedax4dart" | cut -c 14-)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: workaround for https://github.com/sensuikan1973/libedax4dart/issues/828
if: ${{ matrix.target_os == 'Windows' }}
shell: bash
run: git config --system core.longpaths true
- name: build libedax
shell: bash
env:
dst: ${{ env.OUTPUT_DIR }}
libedax_build_command: ${{ matrix.libedax_build_command }}
run: ./scripts/build_libedax.sh
- name: output build info
shell: bash
run: .github/scripts/output_build_info.sh ${{ env.OUTPUT_DIR }}
- name: compress files (Windows)
if: ${{ matrix.target_os == 'Windows' }}
run: mkdir -p ${{ env.PUBLISH_DIR }} && powershell Compress-Archive -Path ${{ env.OUTPUT_DIR }} -DestinationPath ${{ env.PUBLISH_DIR }}/${{ matrix.target_os }}.zip
- name: compress files (Linux, MacOS)
if: ${{ matrix.target_os == 'macOS' || matrix.target_os == 'Linux' || matrix.target_os == 'iOS' }}
run: mkdir -p ${{ env.PUBLISH_DIR }} && zip -r ${{ env.PUBLISH_DIR }}/${{ matrix.target_os }}.zip ${{ env.OUTPUT_DIR }}
- name: upload artifact
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.target_os }}
path: ${{ env.PUBLISH_DIR }}/${{ matrix.target_os }}.zip
create_release:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: download all artifacts
uses: actions/download-artifact@v8
with:
path: artifacts
- uses: softprops/action-gh-release@v3
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
tag_name: ${{ needs.build.outputs.version }}
files: artifacts/*/*.zip
generate_release_notes: true