Skip to content

Commit e2d5877

Browse files
committed
chore: format
1 parent 7c40abc commit e2d5877

1 file changed

Lines changed: 69 additions & 70 deletions

File tree

.github/workflows/release.yml

Lines changed: 69 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -5,99 +5,98 @@ on:
55
tags:
66
- "v*"
77
branches:
8-
- main
9-
- rc
10-
- beta
11-
- nightly
12-
- hotfix
13-
- "*.x"
8+
- main
9+
- rc
10+
- beta
11+
- nightly
12+
- hotfix
13+
- "*.x"
1414

1515
jobs:
1616
build:
1717
name: Build
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
target: [ windows, linux, macos]
21+
target: [windows, linux, macos]
2222
include:
2323
- target: windows
2424
runner: windows-latest
25-
channel: 'beta'
25+
channel: "beta"
2626
artifact: build/windows/x64/runner/Release
2727
- target: linux
2828
runner: ubuntu-latest
29-
channel: 'stable'
29+
channel: "stable"
3030
artifact: build/linux/x64/release/bundle
3131
- target: macos
3232
runner: macos-latest
33-
channel: 'stable'
33+
channel: "stable"
3434
artifact: "build/macos/Build/Products/Release/Past Paper Master.app"
3535
runs-on: ${{ matrix.runner }}
3636
environment: ${{ github.ref_name }}
3737
timeout-minutes: 20
3838
steps:
39-
- name: Checkout
40-
uses: actions/checkout@v3
41-
42-
- name: set version number (unix)
43-
if: ${{ github.event_name == 'tags' }} and ${{ matrix.runner != 'windows-latest' }}
44-
run: echo "VERSION_NUM=$(echo ${{ github.ref }} | cut -d / -f 3)" >> $GITHUB_ENV
45-
- name: set version number (windows)
46-
if: ${{ github.event_name == 'tags' }} and ${{ matrix.runner == 'windows-latest' }}
47-
run: echo "VERSION_NUM=$(Split-Path -Leaf ${{ github.ref }})" >> $env:GITHUB_ENV
48-
39+
- name: Checkout
40+
uses: actions/checkout@v3
4941

50-
- name: Install Flutter
51-
uses: subosito/flutter-action@v2.10.0
52-
with:
53-
channel: ${{ matrix.channel }}
54-
cache: true
55-
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
56-
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
57-
architecture: x64 # action no current support for arm64
42+
- name: set version number (unix)
43+
if: ${{ github.event_name == 'tags' }} and ${{ matrix.runner != 'windows-latest' }}
44+
run: echo "VERSION_NUM=$(echo ${{ github.ref }} | cut -d / -f 3)" >> $GITHUB_ENV
45+
- name: set version number (windows)
46+
if: ${{ github.event_name == 'tags' }} and ${{ matrix.runner == 'windows-latest' }}
47+
run: echo "VERSION_NUM=$(Split-Path -Leaf ${{ github.ref }})" >> $env:GITHUB_ENV
5848

59-
- name: Install Dependencies (windows)
60-
if: ${{ matrix.runner == 'windows-latest' }}
61-
run: |
62-
flutter config --enable-windows-desktop
63-
- name: Install Dependencies (linux)
64-
if: ${{ matrix.runner == 'ubuntu-latest' }}
65-
run: |
66-
sudo apt-get update -y
67-
sudo apt-get install -y ninja-build libgtk-3-dev
68-
flutter config --enable-linux-desktop
69-
- name: Install Dependencies (macos)
70-
if: ${{ matrix.runner == 'macos-latest' }}
71-
run: |
72-
flutter config --enable-macos-desktop
49+
- name: Install Flutter
50+
uses: subosito/flutter-action@v2.10.0
51+
with:
52+
channel: ${{ matrix.channel }}
53+
cache: true
54+
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
55+
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
56+
architecture: x64 # action no current support for arm64
7357

74-
- name: Build Flutter ${{ matrix.target }}
75-
run: |
76-
make build ${{ matrix.target }}
58+
- name: Install Dependencies (windows)
59+
if: ${{ matrix.runner == 'windows-latest' }}
60+
run: |
61+
flutter config --enable-windows-desktop
62+
- name: Install Dependencies (linux)
63+
if: ${{ matrix.runner == 'ubuntu-latest' }}
64+
run: |
65+
sudo apt-get update -y
66+
sudo apt-get install -y ninja-build libgtk-3-dev
67+
flutter config --enable-linux-desktop
68+
- name: Install Dependencies (macos)
69+
if: ${{ matrix.runner == 'macos-latest' }}
70+
run: |
71+
flutter config --enable-macos-desktop
7772
78-
- name: Zip artifact (Windows)
79-
if: ${{ matrix.runner == 'windows-latest' }}
80-
shell: pwsh
81-
run: Compress-Archive "${{ matrix.artifact }}" "ppm-${{ matrix.target }}-$Env:VERSION_NUM.zip"
82-
- name: Zip artifact (Linux)
83-
if: ${{ matrix.runner == 'ubuntu-latest' }}
84-
shell: bash
85-
run: tar -C "$(dirname ${{ matrix.artifact }})" -czf "ppm-${{ matrix.target }}-${VERSION_NUM}.tar.gz" "$(basename ${{ matrix.artifact }})" --transform "s/$(basename ${{ matrix.artifact }})/PastPaperMaster/"
86-
- name: Zip artifact (MacOS)
87-
if: ${{ matrix.runner == 'macos-latest' }}
88-
shell: bash
89-
run: brew install create-dmg && create-dmg --icon "$(basename ${{ matrix.artifact }})" 200 190 --app-drop-link 600 185 --volname "PastPaperMaster" "ppm-${{ matrix.target }}-${VERSION_NUM}.dmg" "${{ matrix.artifact }}"
73+
- name: Build Flutter ${{ matrix.target }}
74+
run: |
75+
make build ${{ matrix.target }}
9076
91-
- name: Upload artifact
92-
uses: actions/upload-artifact@v3
93-
with:
94-
name: ppm-${{ matrix.target }}-${{ env.VERSION_NUM }}
95-
path: ppm-${{ matrix.target }}-${{ env.VERSION_NUM }}.*
96-
- uses: ncipollo/release-action@v1
97-
if: ${{ github.event_name == 'tags' }}
98-
with:
99-
artifacts: ppm-${{ matrix.target }}-${{ env.VERSION_NUM }}.*
100-
token: ${{ secrets.GITHUB_TOKEN }}
101-
allowUpdates: true
102-
draft: true
103-
bodyFile: ".github/docs/release-notes.md"
77+
- name: Zip artifact (Windows)
78+
if: ${{ matrix.runner == 'windows-latest' }}
79+
shell: pwsh
80+
run: Compress-Archive "${{ matrix.artifact }}" "ppm-${{ matrix.target }}-$Env:VERSION_NUM.zip"
81+
- name: Zip artifact (Linux)
82+
if: ${{ matrix.runner == 'ubuntu-latest' }}
83+
shell: bash
84+
run: tar -C "$(dirname ${{ matrix.artifact }})" -czf "ppm-${{ matrix.target }}-${VERSION_NUM}.tar.gz" "$(basename ${{ matrix.artifact }})" --transform "s/$(basename ${{ matrix.artifact }})/PastPaperMaster/"
85+
- name: Zip artifact (MacOS)
86+
if: ${{ matrix.runner == 'macos-latest' }}
87+
shell: bash
88+
run: brew install create-dmg && create-dmg --icon "$(basename ${{ matrix.artifact }})" 200 190 --app-drop-link 600 185 --volname "PastPaperMaster" "ppm-${{ matrix.target }}-${VERSION_NUM}.dmg" "${{ matrix.artifact }}"
89+
90+
- name: Upload artifact
91+
uses: actions/upload-artifact@v3
92+
with:
93+
name: ppm-${{ matrix.target }}-${{ env.VERSION_NUM }}
94+
path: ppm-${{ matrix.target }}-${{ env.VERSION_NUM }}.*
95+
- uses: ncipollo/release-action@v1
96+
if: ${{ github.event_name == 'tags' }}
97+
with:
98+
artifacts: ppm-${{ matrix.target }}-${{ env.VERSION_NUM }}.*
99+
token: ${{ secrets.GITHUB_TOKEN }}
100+
allowUpdates: true
101+
draft: true
102+
bodyFile: ".github/docs/release-notes.md"

0 commit comments

Comments
 (0)