Add Reset Percent on Save (#30) #176
Workflow file for this run
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 Eclipse | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: Windows | |
os: windows-latest | |
build-type: RelWithDebInfo | |
- name: macOS | |
os: macos-latest | |
- name: Android32 | |
os: ubuntu-latest | |
target: Android32 | |
- name: Android64 | |
os: ubuntu-latest | |
target: Android64 | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build the mod | |
uses: geode-sdk/build-geode-mod@main | |
with: | |
bindings: EclipseMenu/bindings | |
bindings-ref: main | |
# sdk: nightly | |
combine: true | |
export-pdb: true | |
target: ${{ matrix.config.target }} | |
build-config: ${{ matrix.config.build-type || 'Release' }} | |
package: | |
name: Package builds | |
runs-on: ubuntu-latest | |
needs: ['build'] | |
steps: | |
- uses: geode-sdk/build-geode-mod/combine@main | |
id: build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Build Output | |
path: ${{ steps.build.outputs.build-output }} | |
- name: Check if has nightly webhook | |
id: check | |
if: github.ref == 'refs/heads/main' | |
run: echo "has-nightly-webhook=${{ secrets.NIGHTLY_WEBHOOK != '' }}" >> $GITHUB_OUTPUT | |
- uses: actions/checkout@v4 | |
if: ${{ steps.check.outputs.has-nightly-webhook == 'true' }} | |
- name: Get commit messages | |
id: commit | |
if: ${{ steps.check.outputs.has-nightly-webhook == 'true' }} | |
run: | | |
echo "commit-message=$(git log -1 --pretty=format:"%s" | head -n 1)" >> $GITHUB_OUTPUT | |
# echo "commit-message-full=$(echo $COMMIT_MESSAGE | tail -n +2)" >> $GITHUB_OUTPUT # Bash is weird, this doesn't work | |
echo "build-color=#$(git log -1 --pretty=format:"%h" | cut -c 1-6)" >> $GITHUB_OUTPUT | |
#env: | |
# COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
- name: Upload release to Discord | |
uses: prevter/discord-webhook@main | |
if: ${{ steps.check.outputs.has-nightly-webhook == 'true' }} | |
with: | |
webhook-url: ${{ secrets.NIGHTLY_WEBHOOK }} | |
content: 'New nightly build available!' | |
files: ${{ steps.build.outputs.build-output }}/*.geode | |
embed-title: ${{ steps.commit.outputs.commit-message }} | |
# embed-description: ${{ steps.commit.outputs.commit-message-full }} | |
embed-color: ${{ steps.commit.outputs.build-color }} | |
embed-url: ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} | |
embed-author: ${{ github.actor }} | |
embed-author-icon: 'https://avatars.githubusercontent.com/u/${{ github.actor_id }}?v=4' | |
embed-timestamp: 'now' | |
debug-print: true |