Skip to content

feat: Update dependencies #19

feat: Update dependencies

feat: Update dependencies #19

name: Release
on:
push:
branches:
- main
- beta
- alpha
- "*.x"
env:
flutter_version: "3.10.x"
jobs:
get-next-version:
name: Get next version
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- id: get-next-version
name: Get next version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx --force -p conventional-changelog-conventionalcommits@5 -p @semantic-release/exec -p @semantic-release/git -p semantic-release-export-data -p https://github.com/Tlepel/semantic-release.git#fix-versions-share-head semantic-release --dry-run
outputs:
new-release-published: ${{ steps.get-next-version.outputs.new-release-published }}
new-release-version: ${{ steps.get-next-version.outputs.new-release-version }}
# android_build:
# name: Android Build
# needs: [get-next-version]
# runs-on: ubuntu-latest
# env:
# VERSION: ${{ needs.get-next-version.outputs.new-release-version }}
# timeout-minutes: 10
# if: ${{ needs.get-next-version.outputs.new-release-published }}
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - uses: webfactory/[email protected]
# with:
# ssh-private-key: |
# ${{ secrets.LENRA_UI_RUNNER_SSH }}
# ${{ secrets.LENRA_COMPONENTS_SSH }}
# ${{ secrets.CLIENT_COMMON_SSH }}
# ${{ secrets.CLIENT_APP_SSH }}
# - name: Install Flutter & Dependencies
# uses: subosito/[email protected]
# with:
# flutter-version: ${{ env.flutter_version }}
# - name: Setup yq
# id: setup-yq
# uses: shiipou/setup-yq-action@stable
# - name: Update pubspec version
# run: yq -i ".version = \"${{ env.VERSION }}\"" pubspec.yaml
# - name: Flutter Build APK
# run: flutter build apk --no-tree-shake-icons --dart-define=LENRA_SERVER_URL=https://api.lenra.io
# - name: Upload APK artifact
# uses: actions/upload-artifact@v2
# with:
# name: app-release
# path: build/app/outputs/flutter-apk/app-release.apk
release:
name: Release
# needs: [android_build]
needs: [get-next-version]
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v2
- name: download-artifacts
uses: actions/download-artifact@v3
with:
path: artifacts/
- name: Docker Login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.LENRA_UI_RUNNER_SSH }}
${{ secrets.LENRA_COMPONENTS_SSH }}
${{ secrets.CLIENT_COMMON_SSH }}
${{ secrets.CLIENT_APP_SSH }}
- name: Install Flutter & Dependencies
uses: subosito/[email protected]
with:
flutter-version: ${{ env.flutter_version }}
- name: Build Flutter Web
run: |
flutter build web --no-tree-shake-icons
cd ..
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "18"
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Cache docker build
uses: actions/cache@v2
with:
path: ~/.docker-cache
key: ${{ runner.os }}-docker
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_GITHUB_TOKEN }}
DOCKER_IMAGE: lenra/client
run: |
sudo chown $USER:$USER .github/release.sh
sudo chmod +x .github/release.sh
npx --force -p conventional-changelog-conventionalcommits@5 -p @semantic-release/exec -p @semantic-release/git -p semantic-release-export-data -p https://github.com/Tlepel/semantic-release.git#fix-versions-share-head semantic-release