Skip to content

Commit

Permalink
Adding actions for automated builds (#25)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
erickzanardo authored May 26, 2021
1 parent 2ed0fb5 commit 587406a
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
117 changes: 117 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 587406a

Please sign in to comment.