1.3.0 Pre-release #6
Workflow file for this run
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 Pre-Release | |
on: | |
release: | |
types: | |
- prereleased | |
jobs: | |
publish-job: | |
runs-on: ubuntu-latest | |
env: | |
PROJECT_FOLDER: ./JQLBuilder | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup .NET Core SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8.0.x" | |
# running tests for all projects in the solution | |
- name: Test | |
run: dotnet test . --verbosity quiet | |
# determining the version of the package to be published | |
- name: Determine package version | |
run: echo "VERSION=${{ github.event.release.tag_name }}.$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV | |
# publishing the package | |
- name: Publish | |
working-directory: ${{ env.PROJECT_FOLDER }} | |
run: | | |
dotnet pack --no-dependencies --configuration Release --output ./artifacts /p:Version=${{ env.VERSION }} | |
dotnet nuget push ./artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{ secrets.SQLBUILDER_NUGET_API_KEY }} |