Skip to content

feat: update version to 0.2.0 #24

feat: update version to 0.2.0

feat: update version to 0.2.0 #24

Workflow file for this run

name: Build
# Controls when the workflow will run
on:
push:
tags:
- "v*"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
# APP name
APP_NAME: alisthelper
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-windows:
# The type of runner that the job will run on
runs-on: windows-latest
env:
# The name of the installer
WINDOWS_INSTALLER_NAME: AlistHelper_installer_${{ github.ref_name }}_windows-x86_64
WINDOWS_PORTABLE_NAME: AlistHelper_${{ github.ref_name }}_windows-x86_64
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Build
run: |
flutter config --enable-windows-desktop
flutter pub get
dart run build_runner build
flutter build windows
- name: Copy innosetup.iss
# copy assets/alisthelper.ico to build/windows/x64/runner/
# copy build/windows/x64/runner/Release/innosetup.iss to build/windows/x64/runner/
run: |
cp windows/scripts/innosetup.iss build/windows/x64/runner/
cp assets/alisthelper.ico build/windows/x64/runner/
- name: Build installer executable
working-directory: build/windows/x64/runner/
run: |
iscc /F${{ env.WINDOWS_INSTALLER_NAME }} innosetup.iss /DAppVersion=${{ github.ref_name }}
- name: Archive Portable Release
uses: thedoctor0/zip-release@master
with:
type: "zip"
filename: ${{env.WINDOWS_PORTABLE_NAME}}.zip
directory: build/windows/x64/runner/Release
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{github.ref_name}}
draft: true
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
files: |
build/windows/x64/runner/Output/${{env.WINDOWS_INSTALLER_NAME}}.exe
build/windows/x64/runner/Release/${{env.WINDOWS_PORTABLE_NAME}}.zip
- name: Upload Release Asset
uses: actions/upload-artifact@v3
with:
name: artifact-windows
path: build/windows/x64/runner/Release/${{env.WINDOWS_PORTABLE_NAME}}.zip
build-macos:
# The type of runner that the job will run on
runs-on: macos-latest
env:
# The name of the app
MACOS_APP_NAME: AlistHelper_app_${{ github.ref_name }}_macos-x86_64
DMG_NAME: AlistHelper_${{ github.ref_name }}_macos.dmg
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Build
run: |
flutter config --enable-macos-desktop
flutter pub get
dart run build_runner build
flutter build macos
- name: Archive App
run: |
cd build/macos/Build/Products/Release/
tar -czf ${{ env.MACOS_APP_NAME }}.tar.gz alisthelper.app
hdiutil create -volname "alisthelper" -srcfolder alisthelper.app -ov -format UDZO ${{ env.DMG_NAME }}
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
draft: true
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
files: |
build/macos/Build/Products/Release/${{ env.DMG_NAME }}
build/macos/Build/Products/Release/${{ env.MACOS_APP_NAME }}.tar.gz
- name: Upload Release Asset
uses: actions/upload-artifact@v3
with:
name: artifact-macos
path: build/macos/Build/Products/Release/${{ env.MACOS_APP_NAME }}.tar.gz