Skip to content

Feature/build #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ file_header_template = Copyright (c) Christopher Whitley. All rights reserved.\n
[*.xml]
indent_size = 2

################################################################################
### Yaml files
################################################################################
[*.yml]
indent_size = 2

################################################################################
### C# files
################################################################################
Expand Down Expand Up @@ -466,4 +472,4 @@ dotnet_diagnostic.CA1027.severity = none
### CA1008: Enums should have zero value
### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1008
################################################################################
dotnet_diagnostic.CA1008.severity = none
dotnet_diagnostic.CA1008.severity = none
83 changes: 83 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Build AsepriteDotNEt

on:
pull_request:
branches: [ $default-branch ]
push:
branches:
- $default-branch
tags:
- 'version*'

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3

- name: Clone Repository
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Build
run: dotnet run --project build/AsperiteDotNet.Build.csproj -- --target=Default

- name: Upload Artifacts
run: dotnet run --project build/AsepriteDotNet.Build.csproj -- --target=UploadArtifacts
env:
ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }}
ACTIONS_RUNTIME_URL: "${{ env.ACTIONS_RUNTIME_URL }}"

deploy-to-github:
name: Deploy To GitHub
needs: [ build ]
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
permissions:
packages: write
contents: write
steps:
- name: Clone Repository
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: PUsh GitHub NuGets
run: dotnet run --project build/AsepriteDotNet.Build.csproj -- --target=DeployNuGetsToGitHub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deploy-to-nuget:
name: Deploy To NuGet
needs: [ build ]
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/version') }}
permissions:
packages: write
contents: write
steps:
- name: Clone Repository
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Push NuGets
run: dotnet run --project build/AsepriteDotNet.Build.csproj -- --target=DeployNuGets
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}



Binary file added .images/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading