-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (50 loc) · 1.46 KB
/
linux-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: App Linux Release
on:
push:
branches: [ main ]
jobs:
version:
name: Create version number
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v3
- name: Fetch all history for all tags and branches
run: |
git fetch --prune --depth=1000
- name: Create version
id: version
run: echo "version=v$(grep ^version pubspec.yaml |cut -f 2 -d ' '|cut -f 1 -d '+')" >> $GITHUB_OUTPUT
build:
name: Build and Create release
needs: [ version ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel : 'stable'
cache: true
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- run: flutter pub get
#- run: flutter test
- run: flutter config --enable-linux-desktop
- run: flutter build linux --release
- name: Archive Release
uses: thedoctor0/zip-release@0.7.1
with:
type: 'tar'
directory: 'build/linux/x64/release/'
path: 'bundle'
filename: 'linux_x64.tar.gz'
- name: Create a Release in GitHub
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: 'build/linux/x64/release/linux_x64.tar.gz'
token: "${{ secrets.GH_TOKEN }}"
tag: "${{ needs.version.outputs.output1 }}"
commit: "${{ github.sha }}"