fix: macos curl error #23
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
name: Tag build | |
on: | |
push: | |
tags: | |
- '**' | |
jobs: | |
build-android-apk: | |
name: "Build Android APK" | |
runs-on: ubuntu-22.04 | |
permissions: write-all | |
timeout-minutes: 30 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Install java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "zulu" | |
java-version: "21.x" | |
cache: "gradle" | |
- name: Set up fvm | |
run: ./scripts/setup_fvm.sh | |
- name: Enable android | |
run: fvm flutter config --enable-android | |
- name: Decode keystore and create jks and properties file for signing the app | |
shell: bash | |
run: | | |
echo "$KEYSTORE" | base64 --decode > app/keystore.jks | |
echo "storeFile=keystore.jks" >> key.properties | |
echo "keyAlias=upload" >> key.properties | |
echo "storePassword=$KEYSTORE_PASSWORD" >> key.properties | |
echo "keyPassword=$KEYSTORE_PASSWORD" >> key.properties | |
env: | |
KEYSTORE: "${{ secrets.ANDROID_RELEASE_KEY }}" | |
KEYSTORE_PASSWORD: "${{ secrets.ANDROID_RELEASE_KEY_PASSWORD }}" | |
working-directory: ./android | |
- name: Build | |
run: fvm flutter build apk --release | |
- name: Upload artifcats | |
uses: actions/upload-artifact@v4 | |
with: | |
name: android-binary | |
path: build/app/outputs/flutter-apk/app-release.apk | |
build-linux: | |
name: "Build Linux x64" | |
runs-on: ubuntu-22.04 | |
permissions: write-all | |
timeout-minutes: 30 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Install Flutter dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -qy libgtk-3-dev libx11-dev pkg-config cmake ninja-build libblkid-dev clang unzip libayatana-appindicator3-dev | |
- name: Set up fvm | |
run: ./scripts/setup_fvm.sh | |
- name: Build quickjs-c-bridge | |
run: pushd quickjs-c-bridge; cmake -S ./linux -B ./build/linux; cmake --build build/linux; popd | |
- name: Enable desktop | |
run: fvm flutter config --enable-linux-desktop | |
- name: Some wired mkdir | |
run: mkdir -p build/linux/x64/release/bundle/lib | |
- name: Flutter build app | |
run: fvm flutter build linux --release | |
- name: Copy libquickjs | |
run: cp quickjs-c-bridge/build/linux/libquickjs_c_bridge_plugin.so build/linux/x64/release/bundle/lib/ || exit 0 | |
- name: Compress artifacts | |
run: tar -a -c -f letscheck-linux-x64.tar.xz -C ./build/linux/x64/release/bundle . | |
- name: Upload artifcats | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-x64-binary | |
path: letscheck-linux-x64.tar.xz | |
build-linux-arm64: | |
name: "Build Linux arm64" | |
runs-on: ubuntu-22.04-arm | |
permissions: write-all | |
timeout-minutes: 30 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Install Flutter dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -qy libgtk-3-dev libx11-dev pkg-config cmake ninja-build libblkid-dev clang unzip libayatana-appindicator3-dev | |
- name: Set up fvm | |
run: ./scripts/setup_fvm.sh | |
- name: Build quickjs-c-bridge | |
run: pushd quickjs-c-bridge; cmake -S ./linux -B ./build/linux; cmake --build build/linux; popd | |
- name: Enable desktop | |
run: fvm flutter config --enable-linux-desktop | |
- name: Some wired mkdir | |
run: mkdir -p build/linux/arm64/release/bundle/lib | |
- name: Flutter build app | |
run: fvm flutter build linux --release | |
- name: Copy libquickjs | |
run: cp quickjs-c-bridge/build/linux/libquickjs_c_bridge_plugin.so build/linux/arm64/release/bundle/lib/ || exit 0 | |
- name: Compress artifacts | |
run: tar -a -c -f letscheck-linux-arm64.tar.xz -C ./build/linux/arm64/release/bundle . | |
- name: Upload artifcats | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-arm64-binary | |
path: letscheck-linux-arm64.tar.xz | |
build-linux-flatpak: | |
needs: [build-linux, build-linux-arm64] | |
name: "Build Linux flatpak" | |
runs-on: ubuntu-22.04 | |
container: | |
image: bilelmoussaoui/flatpak-github-actions:freedesktop-22.08 | |
options: --privileged | |
permissions: write-all | |
timeout-minutes: 10 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Download binary from build-linux | |
uses: actions/download-artifact@v4 | |
with: | |
name: linux-x64-binary | |
- name: Extract x64 binary | |
run: mkdir -p ./build/linux/x64/release/bundle && tar -x -f letscheck-linux-x64.tar.xz -C ./build/linux/x64/release/bundle | |
- name: Download binary from build-linux-arm64 | |
uses: actions/download-artifact@v4 | |
with: | |
name: linux-arm64-binary | |
- name: Extract arm64 binary | |
run: mkdir -p ./build/linux/arm64/release/bundle && tar -x -f letscheck-linux-arm64.tar.xz -C ./build/linux/arm64/release/bundle | |
- name: Build flatpak | |
uses: jochumdev/flatpak-github-actions/flatpak-builder@builder-update-deps | |
with: | |
bundle: letscheck.flatpak | |
manifest-path: ./io.github.jochumdev.letscheck.yml | |
upload-artifact: "false" | |
- name: Upload artifcats | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-flatpak | |
path: letscheck.flatpak | |
build-macos: | |
name: "Build MacOS" | |
runs-on: macos-latest | |
permissions: write-all | |
timeout-minutes: 30 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: "Select the latest stable Xcode 12" | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- name: Set up fvm | |
run: ./scripts/setup_fvm.sh | |
- name: Install create-dmg | |
run: brew install create-dmg | |
- name: Enable desktop | |
run: fvm flutter config --enable-macos-desktop | |
- name: Flutter build app | |
run: fvm flutter build macos | |
- name: Create dmg | |
run: | | |
./scripts/create_mac_dmg.sh | |
- name: Compress artifacts | |
run: cd build/macos/Build/Products/Release && zip -r ../../../../../letscheck-macos.zip letscheck.app | |
- name: Upload zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos-zip | |
path: letscheck-macos.zip | |
- name: Upload dmg | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos-dmg | |
path: build/macos/Build/Products/Release/letscheck.dmg | |
build-windows: | |
name: "Build Windows" | |
runs-on: windows-latest | |
permissions: write-all | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Make yq tool available on Windows runners | |
run: choco install yq | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
flutter-version-file: pubspec.yaml | |
- name: Enable desktop | |
run: flutter config --enable-windows-desktop | |
# - name: Generate MSIX-compatible version | |
# uses: ashley-taylor/[email protected] | |
# id: msixver | |
# with: | |
# value: ${{ github.event.release.tag_name }} | |
# regex: (\-\w+)|(\+\w+) | |
# replacement: "" | |
# - name: Write MSIX | |
# uses: DamianReeves/[email protected] | |
# with: | |
# path: pubspec.yaml | |
# contents: | | |
# msix_config: | |
# display_name: Letscheck | |
# publisher_display_name: René Jochum | |
# identity_name: io.github.jochumdev.letscheck | |
# publisher: CN=Letscheck | |
# msix_version: ${{steps.msixver.outputs.value }}.0 | |
# logo_path: assets\icons\letscheck.png | |
# architecture: x64 | |
# capabilities: "internetClient,removableStorage" | |
# store: false | |
# certificate_path: package\letscheck.pfx | |
# certificate_password: ${{ secrets.WIN_CERT_PASS }} | |
# build_windows: false | |
# install_certificate: false | |
# write-mode: append | |
- name: Flutter build app | |
run: flutter build windows | |
- name: Compress artifacts | |
run: cd build/windows/x64/runner/Release && C:/ProgramData/Chocolatey/bin/7z.exe a ../../../../../letscheck-windows-x64.zip . | |
- name: Upload zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-x64-zip | |
path: letscheck-windows-x64.zip | |
# - name: Create MSIX | |
# run: flutter pub run msix:create | |
# - name: Upload MSIX to release | |
# uses: svenstaro/upload-release-action@v2 | |
# with: | |
# repo_token: ${{ secrets.GITHUB_TOKEN }} | |
# file: build\windows\x64\runner\Release\letscheck.msix | |
# asset_name: letscheck-windows-x64-${{ github.event.release.tag_name }}.msix | |
# tag: ${{ github.ref }} | |
build-web: | |
name: "Build Web" | |
runs-on: ubuntu-22.04 | |
permissions: write-all | |
timeout-minutes: 30 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
fetch-depth: 0 | |
- name: Set up fvm | |
run: ./scripts/setup_fvm.sh | |
- name: Enable web | |
run: fvm flutter config --enable-web | |
- name: Flutter build app | |
run: fvm flutter build web --base-href "/letscheck/pwa/" --release | |
- name: Compress artifacts | |
run: cd build/web && zip -r ../../letscheck-web.zip . | |
- name: Upload zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: web-zip | |
path: letscheck-web.zip | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/web | |
destination_dir: pwa | |
force_orphan: true | |
user_name: 'github-ci[bot]' | |
user_email: 'github-actions[bot]@users.noreply.github.com' | |
commit_message: 'Publish to gh-pages' | |
release: | |
needs: [build-android-apk, build-linux-flatpak, build-macos, build-windows, build-web] | |
name: "Release and upload artifacts" | |
runs-on: ubuntu-22.04 | |
permissions: write-all | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download binaries | |
uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
- name: ls downloads | |
run: ls -la | |
- name: Rename files | |
run: | | |
mv app-release.apk letscheck-${{ github.ref_name }}-android.apk | |
mv letscheck-linux-x64.tar.xz letscheck-${{ github.ref_name }}-linux-x64.tar.xz | |
mv letscheck-linux-arm64.tar.xz letscheck-${{ github.ref_name }}-linux-arm64.tar.xz | |
mv letscheck.flatpak letscheck-${{ github.ref_name }}-linux.flatpak | |
mv letscheck.dmg letscheck-${{ github.ref_name }}-macos.dmg | |
mv letscheck-macos.zip letscheck-${{ github.ref_name }}-macos.zip | |
mv letscheck-windows-x64.zip letscheck-${{ github.ref_name }}-windows-x64.zip | |
mv letscheck-web.zip letscheck-${{ github.ref_name }}-web.zip | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
letscheck-${{ github.ref_name }}-android.apk | |
letscheck-${{ github.ref_name }}-linux-x64.tar.xz | |
letscheck-${{ github.ref_name }}-linux-arm64.tar.xz | |
letscheck-${{ github.ref_name }}-linux.flatpak | |
letscheck-${{ github.ref_name }}-macos.dmg | |
letscheck-${{ github.ref_name }}-macos.zip | |
letscheck-${{ github.ref_name }}-windows-x64.zip | |
letscheck-${{ github.ref_name }}-web.zip |