Skip to content

Commit

Permalink
Simplify build back to yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Mar 16, 2024
1 parent 0dcdbf1 commit 1bf5041
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 478 deletions.
67 changes: 53 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,22 @@ on:
- dev
- preview
- v*
paths:
- "src/**"
- ".github/workflows/**"

env:
NugetApiKey: ${{secrets.NUGETAPIKEY}}
TwitterConsumerKey: ${{secrets.TWITTER_CONSUMER_KEY}}
TwitterConsumerSecret: ${{secrets.TWITTER_CONSUMER_SECRET}}
TwitterAccessToken: ${{secrets.TWITTER_ACCESS_TOKEN}}
TwitterAccessTokenSecret: ${{secrets.TWITTER_ACCESS_TOKEN_SECRET}}
DiscordToken: ${{secrets.DISCORD_TOKEN}}
DiscordGuildId: '679761126598115336'
DiscordChannelId: '803717285986566174'
MastodonClientId: ${{secrets.MASTODON_CLIENT_ID}}
MastodonClientSecret: ${{secrets.MASTODON_CLIENT_SECRET}}
MastodonInstance: 'dotnet.social'
#env:
# NugetApiKey: ${{secrets.NUGETAPIKEY}}
# TwitterConsumerKey: ${{secrets.TWITTER_CONSUMER_KEY}}
# TwitterConsumerSecret: ${{secrets.TWITTER_CONSUMER_SECRET}}
# TwitterAccessToken: ${{secrets.TWITTER_ACCESS_TOKEN}}
# TwitterAccessTokenSecret: ${{secrets.TWITTER_ACCESS_TOKEN_SECRET}}
# DiscordToken: ${{secrets.DISCORD_TOKEN}}
# DiscordGuildId: '679761126598115336'
# DiscordChannelId: '803717285986566174'
# MastodonClientId: ${{secrets.MASTODON_CLIENT_ID}}
# MastodonClientSecret: ${{secrets.MASTODON_CLIENT_SECRET}}
# MastodonInstance: 'dotnet.social'

jobs:
build:
Expand All @@ -50,14 +53,50 @@ jobs:
architecture: x64

- name: Add .NET Workloads
run: dotnet workload install maui-ios maui-android maui-maccatalyst maui-windows
run: dotnet workload install maui

- name: Build
run: dotnet run --project build/ShinyBuild.csproj
run: dotnet build Build.slnf /restore -m -property:Configuration=Release -property:PublicRelease=true

- name: Post NuGet Artifacts
uses: actions/upload-artifact@v2
with:
name: nuget-artifacts
path: '**/*.nupkg'

- name: Publish Artifacts
uses: actions/upload-artifact@v3
with:
name: nugets
path: ${{ github.workspace }}/artifacts
retention-days: 5

- name: Publish NuGets
if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/v') }}
run: dotnet nuget push **\*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGETAPIKEY }} --skip-duplicate

- name: Install NerdBank.GitVersioning CLI
if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/v') }}
run: dotnet tool install -g nbgv

- name: Get Nuget Version from Nerdbank
run: nbgv get-version

#https://shinylib.net/release-notes/mobile/
#this.GitVersioningGetVersion().NuGetPackageVersion - Nerdbank versioning in cake
- name: Announce to Mastodon
if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/v') }}
uses: cbrgm/mastodon-github-action@v2
with:
access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }} # access token
url: ${{ secrets.MASTODON_URL }}
message: "Hello from GitHub Actions!"

- name: 'Announce to X/Twitter'
uses: ethomson/send-tweet-action@v1
with:
status: "Hi, this is a test!"
consumer-key: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
consumer-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
7 changes: 0 additions & 7 deletions Shiny.sln
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shiny.Push.AzureNotificatio
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shiny.Net.Http", "src\Shiny.Net.Http\Shiny.Net.Http.csproj", "{DA452A0B-08F8-4809-95F4-9CD583F30FEA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShinyBuild", "build\ShinyBuild.csproj", "{452F676E-22B7-49A6-9603-D39689F0EAAD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shiny.Support.Repositories", "src\Shiny.Support.Repositories\Shiny.Support.Repositories.csproj", "{47A57CFE-A1A8-407A-86FA-FA003D562C58}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shiny.Tests", "tests\Shiny.Tests\Shiny.Tests.csproj", "{B145321D-8E33-4A33-B5CF-37A162C0E261}"
Expand Down Expand Up @@ -192,10 +190,6 @@ Global
{DA452A0B-08F8-4809-95F4-9CD583F30FEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA452A0B-08F8-4809-95F4-9CD583F30FEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA452A0B-08F8-4809-95F4-9CD583F30FEA}.Release|Any CPU.Build.0 = Release|Any CPU
{452F676E-22B7-49A6-9603-D39689F0EAAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{452F676E-22B7-49A6-9603-D39689F0EAAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{452F676E-22B7-49A6-9603-D39689F0EAAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{452F676E-22B7-49A6-9603-D39689F0EAAD}.Release|Any CPU.Build.0 = Release|Any CPU
{47A57CFE-A1A8-407A-86FA-FA003D562C58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47A57CFE-A1A8-407A-86FA-FA003D562C58}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47A57CFE-A1A8-407A-86FA-FA003D562C58}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -371,7 +365,6 @@ Global
{F80BF383-347B-492D-87D2-D566D80AFFC7} = {6374E4D9-1BD8-4880-B603-AFDEA8345D7E}
{A4FAACE2-CE11-415C-8886-97A9A52FB35C} = {6374E4D9-1BD8-4880-B603-AFDEA8345D7E}
{DA452A0B-08F8-4809-95F4-9CD583F30FEA} = {6374E4D9-1BD8-4880-B603-AFDEA8345D7E}
{452F676E-22B7-49A6-9603-D39689F0EAAD} = {3A15354E-BAD2-4195-BE6B-49ED2B4E56E6}
{47A57CFE-A1A8-407A-86FA-FA003D562C58} = {6374E4D9-1BD8-4880-B603-AFDEA8345D7E}
{B145321D-8E33-4A33-B5CF-37A162C0E261} = {7C114E37-36C8-4971-91C6-E2557DDCB4E8}
{2E4505D4-B9B3-4836-A0F8-37BA72025D3D} = {6374E4D9-1BD8-4880-B603-AFDEA8345D7E}
Expand Down
86 changes: 0 additions & 86 deletions build/BuildContext.cs

This file was deleted.

6 changes: 0 additions & 6 deletions build/Constants.cs

This file was deleted.

16 changes: 0 additions & 16 deletions build/Extensions.cs

This file was deleted.

15 changes: 0 additions & 15 deletions build/Program.cs

This file was deleted.

8 changes: 0 additions & 8 deletions build/Properties/launchSettings.json

This file was deleted.

22 changes: 0 additions & 22 deletions build/ShinyBuild.csproj

This file was deleted.

12 changes: 0 additions & 12 deletions build/Tasks/DefaultTask.cs

This file was deleted.

35 changes: 0 additions & 35 deletions build/Tasks/Library/BuildTask.cs

This file was deleted.

21 changes: 0 additions & 21 deletions build/Tasks/Library/CopyArtifactsTask.cs

This file was deleted.

41 changes: 0 additions & 41 deletions build/Tasks/Library/GitHubReleaseTask.cs

This file was deleted.

Loading

0 comments on commit 1bf5041

Please sign in to comment.