update to playable state (some stuff still missing but playable) #101
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: .NET Build | |
on: | |
push: | |
paths-ignore: | |
- '.github/*' | |
- '.github/*_TEMPLATE/**' | |
- '*.md' | |
pull_request: | |
paths-ignore: | |
- '.github/*' | |
- '.github/*_TEMPLATE/**' | |
- '*.md' | |
jobs: | |
build: | |
name: .NET on ${{ matrix.runs-on }} (${{ matrix.configuration }}) | |
runs-on: ${{ matrix.runs-on }} | |
strategy: | |
fail-fast: false | |
matrix: | |
runs-on: [windows-latest,ubuntu-latest] | |
configuration: [Release] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Publish | |
run: dotnet publish -c ${{ matrix.configuration }} --property:PublishDir=../artifacts-${{ matrix.runs-on }} | |
- name: Upload artifact (Lin) | |
uses: actions/upload-artifact@v3 | |
if: matrix.runs-on == 'ubuntu-latest' | |
with: | |
name: PayCheck3-Linux | |
path: artifacts-${{ matrix.runs-on }} | |
if-no-files-found: error | |
- name: Upload artifact (Win) | |
uses: actions/upload-artifact@v3 | |
if: matrix.runs-on == 'windows-latest' | |
with: | |
name: PayCheck3-Windows | |
path: artifacts-${{ matrix.runs-on }} | |
if-no-files-found: error | |
release: | |
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Variables | |
id: vars | |
run: echo sha_short=${GITHUB_SHA::7} >> $GITHUB_OUTPUT | |
- uses: actions/download-artifact@v3 | |
with: | |
path: artifacts | |
- run: for a in *; do zip -r "$a.zip" "$a"; done | |
working-directory: artifacts | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest" | |
prerelease: true | |
title: "Development Build" | |
files: | | |
artifacts/*.zip |