Skip to content

Commit

Permalink
更新自动构建文件
Browse files Browse the repository at this point in the history
  • Loading branch information
MCredbear committed Jan 4, 2025
1 parent e7e4d18 commit 0ec6dba
Showing 1 changed file with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ "master" ]

jobs:
build:
build_android:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -40,3 +40,33 @@ jobs:
tag: ${{ env.VERSION }}
token: ${{ secrets.YOUR_GITHUB_TOKEN }}

build_linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: subosito/[email protected]
with:
flutter-version: '3.23.0-8.0.pre.3'
channel: 'master'

- run: flutter pub get
- run: flutter build linux --release

- name: Extract version from pubspec.yaml
id: extract_version_linux
run: |
VERSION=$(grep '^version:' pubspec.yaml | sed 's/version: //')
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Compress Linux Build
run: |
tar -czvf linux_x64.tar.gz -C build/linux/x64/release/bundle .
- name: Release Linux
uses: ncipollo/[email protected]
with:
artifacts: "linux_x64.tar.gz"
tag: ${{ env.VERSION }}
token: ${{ secrets.YOUR_GITHUB_TOKEN }}

0 comments on commit 0ec6dba

Please sign in to comment.