Parse the relative path to the absolute path. #6
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: Publish Prerelease NuGets | |
on: | |
push: | |
branches: | |
- prerelease | |
env: | |
TIMESTAMP: $(date +'%s') | |
SOLUTION: Cli4Fody.sln | |
jobs: | |
publish: | |
name: Build and Publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3.0.3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Remove Samples | |
run: dotnet sln ${{ env.SOLUTION }} remove $(find samples -name "*.csproj") | |
- name: Restore NuGets | |
run: dotnet restore ${{ env.SOLUTION }} | |
- name: Build Solution | |
run: dotnet build --configuration Release --no-restore ${{ env.SOLUTION }} --version-suffix preview-${{ env.TIMESTAMP }} | |
- name: Delete exists packages | |
run: rm -rf nugets | |
- name: Pack Solution | |
run: dotnet pack ${{ env.SOLUTION }} --configuration Release --no-build --version-suffix preview-${{ env.TIMESTAMP }} | |
- name: Publish | |
run: dotnet nuget push nugets/**.nupkg -k ${{ secrets.API_KEY }} -s https://api.nuget.org/v3/index.json |