Skip to content

Commit

Permalink
Create Github Actions for Prerelease and release (#2)
Browse files Browse the repository at this point in the history
* Create prerelease.yml

Signed-off-by: wolframhaussig <[email protected]>

* Update prerelease.yml

Signed-off-by: wolframhaussig <[email protected]>

* Update prerelease.yml

Signed-off-by: wolframhaussig <[email protected]>

* Update prerelease.yml

Signed-off-by: wolframhaussig <[email protected]>

* Create release.yml

Signed-off-by: wolframhaussig <[email protected]>

* Update release.yml

Signed-off-by: wolframhaussig <[email protected]>

* Update prerelease.yml

Signed-off-by: wolframhaussig <[email protected]>

* Update release.yml

Signed-off-by: wolframhaussig <[email protected]>

* Update release.yml

Signed-off-by: wolframhaussig <[email protected]>

* Update release.yml

Signed-off-by: wolframhaussig <[email protected]>

* Update release.yml

Signed-off-by: wolframhaussig <[email protected]>

* Update release.yml

Signed-off-by: wolframhaussig <[email protected]>

* Update release.yml

Signed-off-by: wolframhaussig <[email protected]>

* Update release.yml

Signed-off-by: wolframhaussig <[email protected]>

---------

Signed-off-by: wolframhaussig <[email protected]>
  • Loading branch information
wolframhaussig authored Jul 23, 2023
1 parent 94f942b commit ac1c856
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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 Pre-Release

on:
push:
branches: [ "main" ]

jobs:
build:
permissions:
contents: write
runs-on: windows-latest

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 StylableWinFormsControls/StylableWinFormsControls.sln
- name: Build
run: dotnet build StylableWinFormsControls/StylableWinFormsControls.sln --no-restore

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
LICENSE
StylableWinFormsControls/StylableWinFormsControls/bin/Debug/net6.0-windows/StylableWinFormsControls.dll
StylableWinFormsControls/StylableWinFormsControls/bin/Debug/*.nupkg
StylableWinFormsControls/StylableWinFormsControls/bin/Debug/*.snupkg

41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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 Release

on:
push:
tags:
- "v*"

jobs:
build:
permissions:
contents: write
runs-on: windows-latest

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 StylableWinFormsControls/StylableWinFormsControls.sln
- name: Build
run: dotnet build StylableWinFormsControls/StylableWinFormsControls.sln -c Release --no-restore

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
LICENSE
StylableWinFormsControls/StylableWinFormsControls/bin/Release/net6.0-windows/StylableWinFormsControls.dll
StylableWinFormsControls/StylableWinFormsControls/bin/Release/*.nupkg
StylableWinFormsControls/StylableWinFormsControls/bin/Release/*.snupkg
- name: Pack nugets
run: dotnet pack StylableWinFormsControls/StylableWinFormsControls.sln -c Release --no-build --output .
- name: Push to NuGet
run: dotnet nuget push *.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json

0 comments on commit ac1c856

Please sign in to comment.