This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
✨ revert 機能実装した #55
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 |