Skip to content

Commit

Permalink
chore(ci): add flutter dekstop to nextcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
vbeaucha committed Aug 16, 2023
1 parent 502cddb commit f9000f8
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 15 deletions.
26 changes: 18 additions & 8 deletions .github/actions/build/flutter-app/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ inputs:
VERSION:
description: "Version of the Flutter app"
required: true
NEXT_CREDENTIALS:
description: "NEXT_CREDENTIALS"
required: true

runs:
using: "composite"
Expand All @@ -23,21 +26,28 @@ runs:
- name: Web build
shell: bash
run: flutter build web
run: |
cd ./APP/ogree_app
flutter build web
- name: Windows build
shell: bash
run: flutter build windows
# - name: Windows build
# shell: bash
# run: |
# cd ./APP/ogree_app
# flutter build windows

- name: Send to Nextcloud
shell: bash
env:
NEXT_CREDENTIALS: ${{ secrets.NEXT_CREDENTIALS }}
NEXT_CREDENTIALS: ${{ inputs.NEXT_CREDENTIALS }}
NEXT_ADDR: https://nextcloud.ditrit.io/remote.php/dav/files/github.actions/Ogree/1_Core/3_APP/bin/${{ inputs.VERSION }}
run: |
run: |
cd ./APP/ogree_app
curl -u $NEXT_CREDENTIALS -X MKCOL $NEXT_ADDR
zip -r ./OGrEE_APP_Web.zip build/web/*
curl -u $NEXT_CREDENTIALS -T OGrEE_APP_Web.zip $NEXT_ADDR/OGrEE_APP_Web_${{ inputs.VERSION }}.zip
Compress-Archive -Path build/windows/runner/Release/* -Destination OGrEE_APP_Win_${{ inputs.VERSION }}.zip
curl -u $env:NEXT_CREDENTIALS -T OGrEE_APP_Win.zip $env:NEXT_ADDR/OGrEE_APP_Win_${{ inputs.VERSION }}.zip
# Compress-Archive -Path build/windows/runner/Release/* -Destination OGrEE_APP_Win_${{ inputs.VERSION }}.zip
# curl -u $NEXT_CREDENTIALS -T OGrEE_APP_Win.zip $NEXT_ADDR/OGrEE_APP_Win_${{ inputs.VERSION }}.zip
14 changes: 13 additions & 1 deletion .github/actions/build/multi-docker/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,19 @@ runs:
# IMAGE_NAME: "arango-api"
# FOLDER_NAME: "./ARANGO_API"
# VERSION: ${{ env.VERSION }}

# TEAM_DOCKER_URL: ${{ inputs.TEAM_DOCKER_URL }}
# TEAM_USERNAME: ${{ inputs.TEAM_USERNAME }}
# TEAM_PASSWORD: ${{ inputs.TEAM_PASSWORD }}

# - name: 🐋 Build BFF
# uses: ./.github/actions/build/docker
# with:
# IMAGE_NAME: "ogree-bff"
# FOLDER_NAME: "./BFF"
# VERSION: ${{ env.VERSION }}
# TEAM_DOCKER_URL: ${{ inputs.TEAM_DOCKER_URL }}
# TEAM_USERNAME: ${{ inputs.TEAM_USERNAME }}
# TEAM_PASSWORD: ${{ inputs.TEAM_PASSWORD }}

- name: 🐋 Build Flutter App
uses: ./.github/actions/build/docker
Expand All @@ -75,6 +81,12 @@ runs:
with:
VERSION: ${{ env.VERSION }}
NEXT_CREDENTIALS: ${{ inputs.NEXT_CREDENTIALS }}

- name: Publish Flutter Desktop on Nexcloud
uses: ./.github/actions/build/flutter-app
with:
VERSION: ${{ env.VERSION }}
NEXT_CREDENTIALS: ${{ inputs.NEXT_CREDENTIALS }}

- name: 🪣 Init Git
if: ${{ !contains(inputs.ENVIRONMENT, 'Candidate') }}
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/versioning-release-candidate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,18 @@ jobs:
run: |
if [[ `git show-ref "${{ env.BRANCH_RELEASE_CANDIDATE }}" 2>/dev/null` ]]; then
echo "[INFO] Branch ${{ env.BRANCH_RELEASE_CANDIDATE }} exists, deleting it"
git config --global user.email "[email protected]"
git config --global user.name "svc"
git branch -d ${{ env.BRANCH_RELEASE_CANDIDATE }}
git push origin --delete ${{ env.BRANCH_RELEASE_CANDIDATE }}
echo "NEEDS_DELETE=true" >> $GITHUB_ENV
else
echo "[INFO] Branch ${{ env.BRANCH_RELEASE_CANDIDATE }} does not exist"
echo "NEEDS_DELETE=false" >> $GITHUB_ENV
fi
- name: 🗑️ Delete Release Candidate branch
if: ${{ env.NEEDS_DELETE == 'true' }}
uses: dawidd6/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branches: ${{ env.BRANCH_RELEASE_CANDIDATE }}

- name: Create Branch release candidate from main
uses: peterjgrainger/[email protected]
Expand Down

0 comments on commit f9000f8

Please sign in to comment.