mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-21 01:39:32 +00:00
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: "Build test deploy"
|
|
|
|
on:
|
|
push:
|
|
branches: [develop, test/feature]
|
|
tags: [v*]
|
|
pull_request:
|
|
branches: [develop]
|
|
pull_request_target:
|
|
branches: [develop]
|
|
|
|
jobs:
|
|
build-test-pack-job:
|
|
name: "Build-Test-Pack"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: "Clone Repository"
|
|
uses: actions/checkout@v4
|
|
- name: "CAKE (Build -> Test -> Package)"
|
|
run: dotnet run --project ./build/Build.csproj -- --target=Default
|
|
- name: "Upload Artifacts For Deploy"
|
|
if: github.event_name != 'pull_request'
|
|
uses: actions/upload-artifact@main
|
|
with:
|
|
name: MonoGame.Extended
|
|
path: artifacts/*
|
|
|
|
deploy-job:
|
|
name: "Deploy Nugets"
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
packages: write
|
|
contents: write
|
|
needs: [build-test-pack-job]
|
|
if: ${{ github.event_name == 'push' }}
|
|
steps:
|
|
- name: "Clone Repository"
|
|
uses: actions/checkout@v4
|
|
- name: "Download Artifacts For Deploy"
|
|
uses: actions/download-artifact@main
|
|
with:
|
|
name: MonoGame.Extended
|
|
path: artifacts
|
|
- name: "Push Package"
|
|
run: dotnet run --project ./build/Build.csproj -- --target=Deploy
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
MYGET_ACCESS_TOKEN: ${{ secrets.MYGET_ACCESS_TOKEN }}
|
|
NUGET_ACCESS_TOKEN: ${{ secrets.NUGET_ACCESS_TOKEN }}
|