LTPlayer (again) (#93) #17
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
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: .NET R2R Build | |
on: | |
push: | |
branches: | |
- "master" | |
jobs: | |
build: | |
strategy: | |
matrix: | |
platform: | |
- win-x86 | |
- win-x64 | |
- win-arm64 | |
- linux-x64 | |
- linux-musl-x64 | |
- linux-arm | |
- linux-arm64 | |
- osx-x64 | |
- osx.11.0-arm64 | |
if: | | |
!contains(github.event.head_commit.message, 'skip ci') | |
runs-on: windows-latest | |
permissions: | |
contents: write # In order to be able to push releases | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Test | |
run: dotnet test --no-build --verbosity normal | |
- name: Publish | |
run: dotnet publish -c Release -r ${{ matrix.platform }} -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true -p:PublishTrimmed=true -p:TrimMode=partial --self-contained true | |
- name: Upload binaries | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.platform }} R2R Binaries | |
path: '*/bin/Release/*/${{ matrix.platform }}/publish/' | |
- name: Pack with 7-zip | |
run: '7z a "${{ matrix.platform }} R2R Binaries.zip" "*/bin/Release/*/${{ matrix.platform }}/publish/"' | |
- uses: bhowell2/github-substring-action@1.0.2 | |
id: sha | |
with: | |
value: ${{ github.sha }} | |
length_from_start: 7 | |
- name: Create Release | |
# You may pin to the exact commit or the version. | |
# uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e | |
uses: ncipollo/release-action@v1.12.0 | |
if: | | |
github.event_name == 'push' && github.ref == 'refs/heads/master' | |
with: | |
# An optional flag which indicates if we should update a release if it already exists. Defaults to false. | |
allowUpdates: true # optional, default is | |
# An optional flag which indicates if artifact read or upload errors should fail the build. | |
artifactErrorsFailBuild: false # optional, default is | |
# An optional set of paths representing artifacts to upload to the release. This may be a single path or a comma delimited list of paths (or globs) | |
artifacts: ${{ matrix.platform }} R2R Binaries.zip | |
# The content type of the artifact. Defaults to raw | |
artifactContentType: raw # optional, default is | |
# An optional body for the release. | |
# body: # optional, default is | |
# An optional body file for the release. This should be the path to the file | |
# bodyFile: # optional, default is | |
# An optional commit reference. This will be used to create the tag if it does not exist. | |
commit: ${{github.sha}} # optional, default is | |
# When provided this will generate a discussion of the specified category. The category must exist otherwise this will cause the action to fail. This isn't used with draft releases | |
# discussionCategory: # optional, default is | |
# Optionally marks this release as a draft release. Set to true to enable. | |
draft: false # optional, default is | |
# Indicates if release notes should be automatically generated. | |
generateReleaseNotes: true # optional, default is false | |
# Indicates if the release should be the "latest" release or not. | |
makeLatest: true # optional, default is legacy | |
# An optional name for the release. If this is omitted the tag will be used. | |
name: Rolling R2R Build for commit `${{steps.sha.outputs.substring}}` # optional, default is | |
## Indicates if the release body should be omitted. | |
#omitBody: # optional, default is false | |
## Indicates if the release body should be omitted during updates. The body will still be applied for newly created releases. This will preserve the existing body during updates. | |
#omitBodyDuringUpdate: # optional, default is false | |
## Indicates if the draft flag should be omitted during updates. The draft flag will still be applied for newly created releases. This will preserve the existing draft state during updates. | |
#omitDraftDuringUpdate: # optional, default is false | |
## Indicates if the release name should be omitted. | |
#omitName: # optional, default is false | |
## Indicates if the release name should be omitted during updates. The name will still be applied for newly created releases. This will preserve the existing name during updates. | |
#omitNameDuringUpdate: # optional, default is false | |
## Indicates if the prerelease flag should be omitted during updates. The prerelease flag will still be applied for newly created releases. This will preserve the existing prerelease state during updates. | |
#omitPrereleaseDuringUpdate: # optional, default is false | |
# Optionally specify the owner of the repo where the release should be generated. Defaults to current repo's owner. | |
# owner: # optional, default is | |
# Optionally marks this release as prerelease. Set to true to enable. | |
prerelease: true # optional, default is | |
# Indicates if existing release artifacts should be removed, Defaults to false. | |
removeArtifacts: false # optional, default is false | |
# Indicates if existing release artifacts should be replaced. Defaults to true. | |
replacesArtifacts: true # optional, default is true | |
# Optionally specify the repo where the release should be generated. Defaults to current repo | |
# repo: # optional, default is | |
# When skipIfReleaseExists is enabled the action will be skipped if a non-draft release already exists for the provided tag. | |
# skipIfReleaseExists: true # optional, default is false | |
# An optional tag for the release. If this is omitted the git ref will be used (if it is a tag). | |
tag: prerelease-r2r-${{steps.sha.outputs.substring}}-${{github.run_id}} # optional, default is | |
# The Github token. | |
token: ${{ github.token }} | |
# When allowUpdates is enabled, this will fail the action if the release it is updating is not a draft or a prerelease. | |
# updateOnlyUnreleased: # optional, default is false |