This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
๐ ใคใณใใผใๆใฎใใใฏใขใใใใฉใซใใผใง D&D ใงใใชใใใฐ #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths: | |
- "lib/**" | |
workflow_dispatch: | |
jobs: | |
windows: | |
runs-on: windows-latest | |
steps: | |
- name: ๐ฅ Checkout repository | |
uses: actions/checkout@v3 | |
- name: ๐ธ Calculate commit hash | |
id: sha | |
uses: pr-mpt/actions-commit-hash@v2 | |
- name: ๐จ Prepare Flutter SDK | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
cache: true | |
- name: โฌ๏ธ Download SVN archives | |
uses: suisei-cn/[email protected] | |
id: svn | |
with: | |
url: ${{ secrets.SVN_ARCHIVES_URL }} | |
target: assets | |
- name: ๐ฆ๏ธ Extract SVN archives | |
run: 7z x -oassets/svn/ assets/svn.zip | |
- name: ๐ Install project dependencies | |
run: flutter pub get | |
- name: ๐ฆ๏ธ Generate intermediates | |
run: flutter pub run build_runner build --delete-conflicting-outputs | |
- name: ๐ Enable windows build | |
run: flutter config --enable-windows-desktop | |
- name: ๐ฑ Build artifacts | |
run: flutter build windows --release | |
- name: โฌ๏ธ Artifacts upload | |
uses: actions/[email protected] | |
with: | |
name: staplver-windows-${{ steps.sha.outputs.short }} | |
path: build/windows/runner/Release | |
- name: ๐ Make windows release zip | |
uses: thedoctor0/[email protected] | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
type: "zip" | |
filename: staplver-windows.zip | |
directory: build/windows/runner/Release | |
- name: ๐ Windows Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: build/windows/runner/Release/staplver-windows.zip | |
macos: | |
runs-on: macos-latest | |
# FIXME: RunnerTests fail on macOS build | |
# ref: https://stackoverflow.com/questions/76247185 | |
steps: | |
- name: ๐ฅ Checkout repository | |
uses: actions/checkout@v3 | |
- name: ๐ธ Calculate commit hash | |
id: sha | |
uses: pr-mpt/actions-commit-hash@v2 | |
- name: ๐จ Prepare Flutter SDK | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
cache: true | |
- name: โฌ๏ธ Download SVN archives | |
uses: suisei-cn/[email protected] | |
id: svn | |
with: | |
url: ${{ secrets.SVN_ARCHIVES_URL }} | |
target: assets | |
- name: ๐ฆ๏ธ Extract SVN archives | |
run: 7z x -oassets/svn/ assets/svn.zip | |
- name: ๐ Install project dependencies | |
run: flutter pub get | |
- name: ๐ฆ๏ธ Generate intermediates | |
run: flutter pub run build_runner build --delete-conflicting-outputs | |
- name: ๐ Enable macOS build | |
run: flutter config --enable-macos-desktop | |
- name: ๐ฑ Build artifacts | |
run: flutter build macos --release | |
- name: โฌ๏ธ Artifacts upload | |
uses: actions/[email protected] | |
with: | |
name: staplver-macOS-${{ steps.sha.outputs.short }} | |
path: build/macos/Build/Products/Release | |
- name: ๐ Make macOS release zip | |
uses: thedoctor0/[email protected] | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
type: "zip" | |
filename: staplver-macOS.zip | |
directory: build/macos/Build/Products/Release | |
- name: ๐ macOS Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: build/macos/Build/Products/Release/staplver-macos.zip | |
linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: ๐ฅ Checkout repository | |
uses: actions/checkout@v3 | |
- name: ๐ธ Calculate commit hash | |
id: sha | |
uses: pr-mpt/actions-commit-hash@v2 | |
- name: ๐จ Prepare Flutter SDK | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
cache: true | |
- name: โฌ๏ธ Download SVN archives | |
uses: suisei-cn/[email protected] | |
id: svn | |
with: | |
url: ${{ secrets.SVN_ARCHIVES_URL }} | |
target: assets | |
- name: ๐ฆ๏ธ Extract SVN archives | |
run: 7z x -oassets/svn/ assets/svn.zip | |
- name: ๐ Install project dependencies | |
run: flutter pub get | |
- name: ๐ฆ๏ธ Generate intermediates | |
run: flutter pub run build_runner build --delete-conflicting-outputs | |
- name: ๐ง Enable Linux build | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev | |
flutter config --enable-linux-desktop | |
- name: ๐ฑ Build artifacts | |
run: flutter build linux --release | |
- name: โฌ๏ธ Artifacts upload | |
uses: actions/[email protected] | |
with: | |
name: staplver-linux-${{ steps.sha.outputs.short }} | |
path: build/linux/x64/release/bundle | |
- name: ๐ Make linux release zip | |
uses: thedoctor0/[email protected] | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
type: "zip" | |
filename: staplver-linux.zip | |
directory: build/linux/x64/release/bundle | |
- name: ๐ linux Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: build/linux/x64/release/bundle/staplver-linux.zip |