Skip to content

Commit

Permalink
Update yaml files under .github folder
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell committed Sep 21, 2024
1 parent d7cf157 commit b8a7384
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 100 deletions.
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# These are supported funding model platforms

github: [mburumaxwell]
patreon: maxwellweru # Replace with a single Patreon username
open_collective: maxwellweru # Replace with a single Open Collective username
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
Expand Down
143 changes: 69 additions & 74 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,18 @@ name: Build

on:
push:
# branches:
# - main
tags:
- '*'
# branches: [main]
tags: ['*']
paths-ignore:
- README.md
- LICENSE
- CHANGELOG.md
- docs/**
- README.md
- LICENSE
- .vscode
pull_request:
branches:
- main
branches: [main]
paths-ignore:
- README.md
- LICENSE
- CHANGELOG.md
- docs/**
- README.md
- LICENSE
- .vscode

jobs:
Build:
Expand All @@ -27,80 +22,80 @@ jobs:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for GitVersion
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for GitVersion

- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '6.x'
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '6.x'

- name: Determine Version
uses: gittools/actions/gitversion/[email protected]
id: gitversion
with:
useConfigFile: true
- name: Determine Version
uses: gittools/actions/gitversion/[email protected]
id: gitversion
with:
useConfigFile: true

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'

- name: Restore
run: dotnet restore
- name: Restore
run: dotnet restore

- name: Build
run: >
dotnet build
--configuration Release
--no-restore
-p:VersionPrefix=${{ steps.gitversion.outputs.fullSemVer }}
- name: Build
run: >
dotnet build
--configuration Release
--no-restore
-p:VersionPrefix=${{ steps.gitversion.outputs.fullSemVer }}
- name: Test
run: >
dotnet test
--configuration Release
--no-build
--collect "Code coverage"
- name: Test
run: >
dotnet test
--configuration Release
--no-build
--collect "Code coverage"
- name: Pack
run: >
dotnet pack
--configuration Release
--no-build
--output ${{ github.workspace }}/drop
-p:PackageVersion=${{ steps.gitversion.outputs.fullSemVer }}
- name: Pack
run: >
dotnet pack
--configuration Release
--no-build
--output ${{ github.workspace }}/drop
-p:PackageVersion=${{ steps.gitversion.outputs.fullSemVer }}
- name: Publish Artifact
uses: actions/upload-artifact@v4
with:
path: ${{ github.workspace }}/drop/*
name: drop
- name: Publish Artifact
uses: actions/upload-artifact@v4
with:
path: ${{ github.workspace }}/drop/*
name: drop

Publish:
runs-on: ubuntu-latest
needs: [ Build ]
if: ${{ startsWith(github.ref, 'refs/tags/') }}

steps:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }}
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }}

- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: drop
path: drop
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: drop
path: drop

- name: Publish to NuGet.org
run: >
dotnet nuget push "${{ github.workspace }}/drop/*"
-k ${{ secrets.NUGET_API_KEY }}
--skip-duplicate
- name: Publish to NuGet.org
run: >
dotnet nuget push "${{ github.workspace }}/drop/*"
-k ${{ secrets.NUGET_API_KEY }}
--skip-duplicate
8 changes: 4 additions & 4 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
40 changes: 20 additions & 20 deletions .github/workflows/update-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@ jobs:
UPDATE_DATE: 'overriden by run action'

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'

- name: Run
run: |
echo "UPDATE_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
dotnet run --project ${{ github.workspace }}/AzureIPNetworksDownloader/AzureIPNetworksDownloader.csproj --framework net8.0
- name: Run
run: |
echo "UPDATE_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
dotnet run --project ${{ github.workspace }}/AzureIPNetworksDownloader/AzureIPNetworksDownloader.csproj --framework net8.0
- name: Create PR if necessary
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Update files for service tags as of ${{ env.UPDATE_DATE }}'
title: 'Update files for service tags as of ${{ env.UPDATE_DATE }}'
branch: update-service-tags
signoff: true
delete-branch: true
sign-commits: true
- name: Create PR if necessary
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Update files for service tags as of ${{ env.UPDATE_DATE }}'
title: 'Update files for service tags as of ${{ env.UPDATE_DATE }}'
branch: update-service-tags
signoff: true
delete-branch: true
sign-commits: true

0 comments on commit b8a7384

Please sign in to comment.