Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • 21-add-onlongpress-with-popup-on-parameters
  • 23-center-vertically-buttons
  • 30-highlight-bin-when-selecting-disabled-item
  • 1.0.7 protected
  • 1.0.6 protected
  • 1.0.5 protected
  • 1.0.4 protected
  • 1.0.3 protected
  • 1.0.2 protected
  • 1.0.0 protected
  • 0.9.1 protected
  • 0.9.0 protected
  • 0.8.4 protected
  • 0.8.3 protected
  • 0.8.2 protected
  • 0.8.1 protected
  • 0.8.0 protected
  • 0.7.0 protected
  • 0.6.1 protected
  • 0.6.0 protected
  • 0.5.0 protected
  • 0.4.0 protected
  • 0.3.0 protected
24 results

.gitlab-ci.yml

Blame
  • .gitlab-ci.yml 1.72 KiB
    image: ghcr.io/cirruslabs/flutter:latest
    
    stages:
      - build-debug
      - release
    
    android:build-debug:
      stage: build-debug
      except:
        - tags
        - master
      script:
        # Check flutter package
        - VERSION_NAME="$(grep '^version:' pubspec.yaml | cut -d' ' -f2)"
        - echo "${VERSION_NAME}"
        - TAG_NAME="${VERSION_NAME}"
        - echo "${TAG_NAME}"
        - >
          if [ $(git tag -l "${TAG_NAME}") ]; then
            echo "Tag ${TAG_NAME} already exists."
          fi
        - flutter clean
        - flutter packages get
        - flutter pub publish --dry-run
      interruptible: true
    
    application:release:
      stage: release
      image:
        name: alpine/git
        entrypoint: [""]
      only:
        - master
      except:
        - tags
      dependencies:
        - android:build-debug
      script:
        - apk --no-cache add curl
        - git config user.email "${GITLAB_USER_EMAIL}"
        - git config user.name "${GITLAB_USER_NAME}"
        - git remote set-url origin https://oauth2:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}
        - VERSION_NAME="$(grep '^version:' pubspec.yaml | cut -d' ' -f2)"
        - echo "${VERSION_NAME}"
        - TAG_NAME="${VERSION_NAME}"
        - echo "${TAG_NAME}"
        - >
          if [ $(git tag -l "${TAG_NAME}") ]; then
            echo "Tag ${TAG_NAME} already exists."
          else
            git tag -a "${TAG_NAME}" -m "Release ${VERSION_NAME}"
            git push origin "${TAG_NAME}"
            flutter clean
            flutter packages get
            echo "${PRIVATE_PACKAGES_REPOSITORY_KEY}" | flutter pub token add https://pub.harrault.fr
            flutter pub publish --force
            curl --silent -d "{\"token\": \"${JABBER_NOTIFICATION_TOKEN}\", \"message\": \"New tag for ${CI_PROJECT_PATH}: ${TAG_NAME}\"}" -H "Content-Type: application/json" -X POST ${JABBER_NOTIFICATION_URL}
          fi