Bump actions/checkout from 3 to 4 #22
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: CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [main, develop] | |
types: [opened, synchronize, ready_for_review] | |
# cancel running actions for current PR if new commits were pushed | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check-changelog: | |
name: check CHANGELOG.md | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v37 | |
- name: Check if changelog was touched | |
run: | | |
changelogFound=$(echo ${{ steps.changed-files.outputs.all_changed_files }} | grep -ow "CHANGELOG.md" | wc -w) | |
if [ $changelogFound -eq 0 ]; then | |
echo '### :boom: Please update the changelog accordingly (https://keepachangelog.com)' >> $GITHUB_STEP_SUMMARY | |
exit 1 | |
fi | |
dotnet-build: | |
name: dotnet build and pack | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.x | |
- run: dotnet build -c Release | |
- run: dotnet pack -c Release --no-build --no-restore -o ./artifacts | |
- run: mv ./artifacts/*.nupkg ./artifacts/Neolution.Extensions.Configuration.GoogleSecrets.${{ github.run_id }}-${{ github.run_attempt }}.nupkg | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "nuget-package" | |
path: ./artifacts/*.nupkg |