Skip to content

Merge pull request #39 from guchengxi1994/master #8

Merge pull request #39 from guchengxi1994/master

Merge pull request #39 from guchengxi1994/master #8

Workflow file for this run

# .github\workflows\build.yml
name: build and release windows
on:
push:
branches:
- release
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Install flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.22.0
- name: Cache pubspec
id: cache-pubspec
uses: actions/cache@v3
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
pubspec-
- name: Run pub get
run: flutter pub get
- name: Bump build number
run: |
flutter pub global activate cider
- name: Build windows
run: |
flutter config --enable-windows-desktop
flutter build windows -v --release
- name: Set tag name
run: echo "tag_name=v$(cider version)" >> $env:GITHUB_ENV
- name: Archive release
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'windows.zip'
directory: build/windows/x64/runner/Release
- name: Publish release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: build/windows/x64/runner/Release/windows.zip
generateReleaseNotes: true
tag: ${{ env.tag_name }}
token: ${{ secrets.RELEASE_TOKEN }}