Trying a pull request #61
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 | |
- "feature/*" | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Dart SDK | |
uses: dart-lang/setup-dart@v1.6.5 | |
- name: Fetch Dependencies | |
run: dart pub get . | |
- name: Make Build Directories | |
run: mkdir -p build/releases/${{ matrix.platform }} | |
- name: Build | |
run: dart compile exe ./bin/main.dart --target-os ${{ matrix.platform }} -o build/releases/${{ matrix.platform }}/${{ matrix.output }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }} | |
path: ${{ matrix.output }} | |
retention-days: 14 | |
# - name: Update MudkiPC | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# GITHUB_USER: ${{ github.actor }} | |
# run: | | |
# git clone https://github.com/Pokemon-Manager/MudkiPC.git | |
# cd MudkiPC | |
# git config user.name "${GITHUB_USER}" | |
# git switch arceus | |
# git pull | |
# cd assets | |
# cd arceus | |
# cp -r ../../../build/releases/${{ matrix.platform }} ./ | |
# git add ./ | |
# git commit -m "Update Arceus" | |
# git push | |
- name: Create Pull Request to MudkiPC | |
uses: haiiliin/action-pull-request-another-repo@v1.0.3 | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} | |
with: | |
source_folder: build/releases/${{ matrix.platform }} | |
destination_repo: Pokemon-Manager/MudkiPC | |
destination_folder: assets/arceus/${{ matrix.platform }} | |
destination_head_branch: main | |
user_email: ${{ github.actor }}@users.noreply.github.com | |
user_name: ${{ github.actor }} | |
title: "Update Arceus - ${{ matrix.platform }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
platform: linux | |
output: arceus.elf | |
- os: windows-latest | |
platform: windows | |
output: arceus.exe | |
- os: macos-latest | |
platform: macos | |
output: arceus.app |