Skip to content

Commit

Permalink
🔧 chore: add push-nuget workflows and update build workflow (#2002)
Browse files Browse the repository at this point in the history
  • Loading branch information
capdiem authored Jun 27, 2024
1 parent 7e17522 commit 60361e6
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: pr-docs-next
name: Build

on:
pull_request:
branches:
- main
paths:
- docs/**
- src/**
workflow_dispatch:

jobs:
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/mirror-gitlab.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/push-nuget-package-manually.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Push nuget package manually
on:
workflow_dispatch:
inputs:
version:
description: 'The version of the package, no "v" prefix'
required: true
default: '1.0.0'

jobs:
push-nuget-manually:
runs-on: ubuntu-latest
steps:
- name: git pull
uses: actions/checkout@v3
- name: setting dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
include-prerelease: true
- name: build
run: dotnet build src/Masa.Blazor.SomethingSkia/Masa.Blazor.SomethingSkia.csproj -c Release /p:ContinuousIntegrationBuild=true
- name: pack Masa.Blazor
run: dotnet pack src/Masa.Blazor/Masa.Blazor.csproj --no-build --include-symbols -c Release -p:PackageVersion=${{github.event.inputs.version}}
- name: pack Masa.Blazor.SomethingSkia
run: dotnet pack src/Masa.Blazor.SomethingSkia/Masa.Blazor.SomethingSkia.csproj --no-build --include-symbols -c Release -p:PackageVersion=${{github.event.inputs.version}}
- name: package push
run: dotnet nuget push "**/*.symbols.nupkg" --skip-duplicate -k ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json
27 changes: 27 additions & 0 deletions .github/workflows/push-nuget-package-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Push nuget package on release
on:
release:
types: [published]

jobs:
push-nuget-on-release:
runs-on: ubuntu-latest
steps:
- name: git pull
uses: actions/checkout@v3
- name: setting dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
include-prerelease: true
- name: build
run: dotnet build src/Masa.Blazor.SomethingSkia/Masa.Blazor.SomethingSkia.csproj -c Release /p:ContinuousIntegrationBuild=true
- name: pack Masa.Blazor
run: dotnet pack src/Masa.Blazor/Masa.Blazor.csproj --no-build --include-symbols -c Release -p:PackageVersion=$GITHUB_REF_NAME
- name: pack Masa.Blazor.SomethingSkia
run: dotnet pack src/Masa.Blazor.SomethingSkia/Masa.Blazor.SomethingSkia.csproj --no-build --include-symbols -c Release -p:PackageVersion=$GITHUB_REF_NAME
- name: package push
run: dotnet nuget push "**/*.symbols.nupkg" --skip-duplicate -k ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json

0 comments on commit 60361e6

Please sign in to comment.