Release Packages #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Packages | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Package Version' | |
required: true | |
deploy_to_nuget: | |
description: 'Deploy packages to nuget.org' | |
required: true | |
default: false | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Install tizen workload | |
run: | | |
curl -sSL https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.sh | bash | |
- name: Build and pack | |
run: | | |
dotnet pack -c Release -o artifacts -p:Version=${{ github.event.inputs.version }} Tizen.UIExtensions.sln | |
- name: Deploy packages | |
env: | |
NUGET_SOURCE: https://tizen.myget.org/F/dotnet/api/v2/package | |
APIKEY: ${{ secrets.MYGET_APIKEY }} | |
run: | | |
dotnet nuget push artifacts/Tizen.UIExtensions.*.nupkg -k $APIKEY -s $NUGET_SOURCE -t 3000 | |
- name: Deploy packages to nuget.org | |
if: github.event.inputs.deploy_to_nuget == 'true' | |
env: | |
NUGET_SOURCE: https://www.nuget.org/api/v2/package | |
APIKEY: ${{ secrets.NUGET_APIKEY }} | |
run: | | |
dotnet nuget push artifacts/Tizen.UIExtensions.*.nupkg -k $APIKEY -s $NUGET_SOURCE -t 3000 |