Skip to content

[monogame]: Fix incorrect rdgen output paths #43

[monogame]: Fix incorrect rdgen output paths

[monogame]: Fix incorrect rdgen output paths #43

Workflow file for this run

name: Build & Text
on:
push:
branches: [ release/* ]
pull_request:
branches: [ release/* ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ windows-latest, macos-latest, ubuntu-latest ]
steps:
- name: πŸ“ Fetch Sources
uses: actions/checkout@v3
- name: πŸ›  Import environment
uses: ./.github/workflows/environment
- name: 🧐 Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: πŸ›  Setup JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
- name: πŸ›  Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.200'
- name: πŸ”§ Prepare build devenv
uses: gradle/gradle-build-action@v2
with:
cache-disabled: true
arguments: prepare
- name: πŸ— Build Plugin (Stable)
uses: gradle/gradle-build-action@v2
with:
arguments: buildPlugin
- name: πŸ“¦ Prepare artifacts folder
shell: pwsh
run: |
mkdir artifacts
- name: πŸ“¦ Emit metadata artifacts
shell: pwsh
run: |
$PROPERTIES = ./gradlew properties
$VERSION_ROW = $PROPERTIES | Select-String "pluginVersion"
$VERSION = ($VERSION_ROW -split ':')[1].Trim()
$PLUGIN_ID_ROW = $PROPERTIES | Select-String "riderPluginId"
$PLUGIN_ID = ($PLUGIN_ID_ROW -split ':')[1].Trim()
echo "PLUGIN_VERSION=$VERSION" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo $VERSION > ${{ env.ARTIFACTS_FOLDER }}/${{ env.ARTIFACTS_VERSION }}
echo "PLUGIN_ID=$PLUGIN_ID" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo $PLUGIN_ID > ${{ env.ARTIFACTS_FOLDER }}/${{ env.ARTIFACTS_PLUGIN_ID }}
- name: πŸ“¦ Emit plugin archive artifact
shell: pwsh
run: |
Get-ChildItem -Path "build\distributions\*.zip" |
Move-Item -Destination "${{ env.ARTIFACTS_FOLDER }}\${{ env.PLUGIN_NAME }}-${{ env.PLUGIN_VERSION }}.zip" -Force
- name: πŸ“¦ Emit changelog artifact
shell: pwsh
run: |
$CHANGELOG = (./gradlew getChangelog --console=plain -q --no-header)
# We need to escape CHANGELOG because it will be transferred over HTTP for GitHub Release creation
$CHANGELOG = $CHANGELOG -replace '%', '%25'
$CHANGELOG = $CHANGELOG -replace "`n", '%0A'
$CHANGELOG = $CHANGELOG -replace "`r", '%0D'
echo $CHANGELOG
echo $CHANGELOG > ${{ env.ARTIFACTS_FOLDER }}/${{ env.ARTIFACTS_CHANGELOG }}
- name: πŸ“¦ Tree artifacts
shell: pwsh
run: |
tree ${{ env.ARTIFACTS_FOLDER }}
- name: πŸ“¦ Upload artifacts
uses: actions/upload-artifact@v3
with:
name: plugin-artifacts-${{ matrix.os }}
path: ${{ env.ARTIFACTS_FOLDER }}/
if-no-files-found: error