Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update actions/setup-dotnet action to v1.8.2 #1276

Merged
merged 1 commit into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 52 additions & 52 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,92 +28,92 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: 'Checkout'
uses: actions/checkout@v2.3.4
with:
lfs: true
fetch-depth: 0
- name: 'Install .NET Core SDK'
uses: actions/setup-dotnet@v1.8.1
- name: 'Dotnet Tool Restore'
run: dotnet tool restore
shell: pwsh
- name: 'Dotnet Cake Build'
run: dotnet cake --target=Build
shell: pwsh
- name: 'Dotnet Cake Pack'
run: dotnet cake --target=Pack
shell: pwsh
- name: 'Publish Artefacts'
uses: actions/upload-artifact@v2.2.4
with:
name: ${{matrix.os}}
path: './Artefacts'
- name: "Checkout"
uses: actions/checkout@v2.3.4
with:
lfs: true
fetch-depth: 0
- name: "Install .NET Core SDK"
uses: actions/setup-dotnet@v1.8.2
- name: "Dotnet Tool Restore"
run: dotnet tool restore
shell: pwsh
- name: "Dotnet Cake Build"
run: dotnet cake --target=Build
shell: pwsh
- name: "Dotnet Cake Pack"
run: dotnet cake --target=Pack
shell: pwsh
- name: "Publish Artefacts"
uses: actions/upload-artifact@v2.2.4
with:
name: ${{matrix.os}}
path: "./Artefacts"

test:
name: Test-${{matrix.template}}-${{matrix.os}}
runs-on: ${{matrix.os}}
strategy:
matrix:
template: ['API', 'GraphQL', 'Orleans', 'NuGet']
template: ["API", "GraphQL", "Orleans", "NuGet"]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: 'Checkout'
uses: actions/checkout@v2.3.4
with:
lfs: true
fetch-depth: 0
- name: 'Install .NET Core SDK'
uses: actions/setup-dotnet@v1.8.1
- name: 'Dotnet Tool Restore'
run: dotnet tool restore
shell: pwsh
- name: 'Dotnet Cake Build'
run: dotnet cake --target=Build
shell: pwsh
- name: 'Dotnet Cake InstallDeveloperCertificate'
run: dotnet cake --target=InstallDeveloperCertificate
shell: pwsh
- name: 'Dotnet Cake Test'
run: dotnet cake --target=Test --template=${{matrix.template}}
shell: pwsh
- name: "Checkout"
uses: actions/checkout@v2.3.4
with:
lfs: true
fetch-depth: 0
- name: "Install .NET Core SDK"
uses: actions/setup-dotnet@v1.8.2
- name: "Dotnet Tool Restore"
run: dotnet tool restore
shell: pwsh
- name: "Dotnet Cake Build"
run: dotnet cake --target=Build
shell: pwsh
- name: "Dotnet Cake InstallDeveloperCertificate"
run: dotnet cake --target=InstallDeveloperCertificate
shell: pwsh
- name: "Dotnet Cake Test"
run: dotnet cake --target=Test --template=${{matrix.template}}
shell: pwsh

push-github-packages:
name: 'Push GitHub Packages'
name: "Push GitHub Packages"
needs: [build, test]
if: github.ref == 'refs/heads/main' || github.event_name == 'release'
environment:
name: 'GitHub Packages'
name: "GitHub Packages"
url: https://github.com/orgs/Dotnet-Boxed/packages
permissions:
packages: write
runs-on: windows-latest
steps:
- name: 'Download Artefact'
- name: "Download Artefact"
uses: actions/download-artifact@v2
with:
name: 'windows-latest'
- name: 'Dotnet NuGet Add Source'
name: "windows-latest"
- name: "Dotnet NuGet Add Source"
run: dotnet nuget add source https://nuget.pkg.github.com/Dotnet-Boxed/index.json --name GitHub --username RehanSaeed --password ${{secrets.GITHUB_TOKEN}}
shell: pwsh
- name: 'Dotnet NuGet Push'
- name: "Dotnet NuGet Push"
run: dotnet nuget push .\*.nupkg --api-key ${{ github.token }} --source GitHub --skip-duplicate
shell: pwsh

push-nuget:
name: 'Push NuGet Packages'
name: "Push NuGet Packages"
needs: [build, test]
if: github.event_name == 'release'
environment:
name: 'NuGet'
name: "NuGet"
url: https://www.nuget.org/packages/Boxed.Templates/
runs-on: windows-latest
steps:
- name: 'Download Artefact'
- name: "Download Artefact"
uses: actions/download-artifact@v2
with:
name: 'windows-latest'
- name: 'Dotnet NuGet Push'
name: "windows-latest"
- name: "Dotnet NuGet Push"
run: |
Get-ChildItem .\ -Filter *.nupkg |
Where-Object { !$_.Name.Contains('preview') } |
Expand Down
54 changes: 27 additions & 27 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
# The branches below must be a subset of the branches above
branches: [main]
schedule:
- cron: '0 8 * * 4'
- cron: "0 8 * * 4"
workflow_dispatch:

jobs:
Expand All @@ -27,40 +27,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]
language: ["csharp"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4
- name: Checkout repository
uses: actions/checkout@v2.3.4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
2 changes: 1 addition & 1 deletion Source/ApiTemplate/.github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ updates:
- "dependencies"
open-pull-requests-limit: 10
schedule:
interval: "daily"
interval: "daily"
98 changes: 49 additions & 49 deletions Source/ApiTemplate/.github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,30 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: 'Checkout'
uses: actions/checkout@v2.3.4
with:
lfs: true
fetch-depth: 0
- name: 'Install .NET Core SDK'
uses: actions/setup-dotnet@v1.8.1
- name: 'Dotnet Tool Restore'
run: dotnet tool restore
shell: pwsh
- name: 'Dotnet Cake Build'
run: dotnet cake --target=Build
shell: pwsh
- name: 'Dotnet Cake Test'
run: dotnet cake --target=Test
shell: pwsh
- name: 'Dotnet Cake Publish'
run: dotnet cake --target=Publish
shell: pwsh
- name: 'Publish Artefacts'
uses: actions/upload-artifact@v2.2.4
with:
name: ${{matrix.os}}
path: './Artefacts'
- name: "Checkout"
uses: actions/checkout@v2.3.4
with:
lfs: true
fetch-depth: 0
- name: "Install .NET Core SDK"
uses: actions/setup-dotnet@v1.8.2
- name: "Dotnet Tool Restore"
run: dotnet tool restore
shell: pwsh
- name: "Dotnet Cake Build"
run: dotnet cake --target=Build
shell: pwsh
- name: "Dotnet Cake Test"
run: dotnet cake --target=Test
shell: pwsh
- name: "Dotnet Cake Publish"
run: dotnet cake --target=Publish
shell: pwsh
- name: "Publish Artefacts"
uses: actions/upload-artifact@v2.2.4
with:
name: ${{matrix.os}}
path: "./Artefacts"
#if (Docker)

docker:
Expand All @@ -69,7 +69,7 @@ jobs:
#endif
environment:
#if (GitHubContainerRegistry)
name: 'GitHub Container Registry'
name: "GitHub Container Registry"
url: https://github.com/GITHUB-USERNAME/GITHUB-PROJECT/pkgs/container/apitemplate
##elif (DockerHub)
# name: 'Docker Hub'
Expand All @@ -82,28 +82,28 @@ jobs:
matrix:
os: [ubuntu-latest]
steps:
- name: 'Checkout'
uses: actions/checkout@v2.3.4
with:
lfs: true
fetch-depth: 0
- name: 'Install .NET Core SDK'
uses: actions/setup-dotnet@v1.8.1
- name: 'Dotnet Tool Restore'
run: dotnet tool restore
shell: pwsh
- name: 'Install QEMU'
id: qemu
uses: docker/setup-qemu-action@v1
- name: 'Available platforms'
run: echo ${{steps.qemu.outputs.platforms}}
- name: 'Install Docker BuildX'
uses: docker/setup-buildx-action@v1
- name: 'Docker Login'
if: github.ref == 'refs/heads/main' || github.event_name == 'release'
run: echo ${{env.DOCKER_PASSWORD}} | docker login ${{env.DOCKER_REGISTRY}} --username ${{env.DOCKER_USERNAME}} --password-stdin
shell: pwsh
- name: 'Dotnet Cake DockerBuild'
run: dotnet cake --target=DockerBuild --tag=${{env.DOCKER_REGISTRY}}/${{env.DOCKER_USERNAME}}/${{env.DOCKER_IMAGE_NAME}} --push=${{github.ref == 'refs/heads/main' || github.event_name == 'release'}}
shell: pwsh
- name: "Checkout"
uses: actions/checkout@v2.3.4
with:
lfs: true
fetch-depth: 0
- name: "Install .NET Core SDK"
uses: actions/setup-dotnet@v1.8.2
- name: "Dotnet Tool Restore"
run: dotnet tool restore
shell: pwsh
- name: "Install QEMU"
id: qemu
uses: docker/setup-qemu-action@v1
- name: "Available platforms"
run: echo ${{steps.qemu.outputs.platforms}}
- name: "Install Docker BuildX"
uses: docker/setup-buildx-action@v1
- name: "Docker Login"
if: github.ref == 'refs/heads/main' || github.event_name == 'release'
run: echo ${{env.DOCKER_PASSWORD}} | docker login ${{env.DOCKER_REGISTRY}} --username ${{env.DOCKER_USERNAME}} --password-stdin
shell: pwsh
- name: "Dotnet Cake DockerBuild"
run: dotnet cake --target=DockerBuild --tag=${{env.DOCKER_REGISTRY}}/${{env.DOCKER_USERNAME}}/${{env.DOCKER_IMAGE_NAME}} --push=${{github.ref == 'refs/heads/main' || github.event_name == 'release'}}
shell: pwsh
#endif
Loading