From 587406a1b6a62f02b756b07cf12c8fbf11621e7e Mon Sep 17 00:00:00 2001 From: Erick Date: Tue, 25 May 2021 22:57:00 -0300 Subject: [PATCH] Adding actions for automated builds (#25) * Adding actions * fixing linux action * fixing linux action * Testing mac upload artifact * Testing mac upload artifact * testing windows upload * testing linux and improving mac and windows * Testing release * Testing release * fixing * fixing * fix * fix * fix * Tried a different approach * Adding release * fix * Limiting to tags --- .github/workflows/lint.yml | 5 +- .github/workflows/release.yml | 117 ++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6cd1009..6f1456d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,10 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: actions/setup-java@v1 - with: - java-version: '12.x' + - uses: actions/checkout@v2 - uses: subosito/flutter-action@v1 with: channel: 'stable' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e665a08 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,117 @@ +name: release + +on: + push: + tags: + - '*' + +jobs: + linux: + runs-on: ubuntu-latest + + defaults: + run: + shell: bash + working-directory: fire_atlas_editor + + steps: + - uses: actions/checkout@v2 + - uses: subosito/flutter-action@v1 + with: + channel: 'stable' + - run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev + - run: flutter config --enable-linux-desktop + - run: flutter build linux + - name: Zips the build + uses: papeloto/action-zip@v1 + with: + files: fire_atlas_editor/build/linux/x64/release/bundle/ + dest: fa_linux.zip + - name: Upload binary + uses: actions/upload-artifact@v2 + with: + name: fa_linux + path: fa_linux.zip + + mac: + runs-on: macos-latest + + defaults: + run: + shell: bash + working-directory: fire_atlas_editor + + steps: + - uses: actions/checkout@v2 + - uses: subosito/flutter-action@v1 + with: + channel: 'stable' + - run: flutter config --enable-macos-desktop + - run: flutter build macos + - name: Zips the build + uses: papeloto/action-zip@v1 + with: + files: fire_atlas_editor/build/macos/Build/Products/Release/Fire\ Atlas\ Editor.app + dest: fa_osx.zip + - name: Upload binary + uses: actions/upload-artifact@v2 + with: + name: fa_osx + path: fa_osx.zip + + windows: + runs-on: windows-latest + + defaults: + run: + shell: bash + working-directory: fire_atlas_editor + + steps: + - uses: actions/checkout@v2 + - uses: subosito/flutter-action@v1 + with: + channel: 'stable' + - run: flutter config --enable-windows-desktop + - run: flutter build windows + - name: Zips the build + uses: papeloto/action-zip@v1 + with: + files: fire_atlas_editor/build/windows/runner/Release/ + dest: fa_windows.zip + - name: Upload binary + uses: actions/upload-artifact@v2 + with: + name: fa_windows + path: fa_windows.zip + + release: + needs: [linux, mac, windows] + runs-on: ubuntu-latest + + steps: + - name: Download Linux artifact + uses: actions/download-artifact@v2 + with: + name: fa_linux + + - name: Download Mac artifact + uses: actions/download-artifact@v2 + with: + name: fa_osx + + - name: Download Windows artifact + uses: actions/download-artifact@v2 + with: + name: fa_windows + + - name: Release + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + files: | + fa_linux.zip + fa_osx.zip + fa_windows.zip + prerelease: true