Skip to content
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
14 changes: 5 additions & 9 deletions .github/workflows/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
- '2wr-app/public/images/**'
- 'TwoWeeksReady.Common/**'
- '.github/workflows/admin.yaml'
branches: [ master ]
branches: [ main ]
pull_request:
paths:
- 'admin/**'
- '2wr-app/public/images/**'
- '.github/workflows/admin.yaml'
branches: [ master ]
branches: [ main ]
workflow_dispatch:
jobs:
build:
Expand All @@ -23,11 +23,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
dotnet-version: 6.0.x
- name: Build
run: dotnet build -c Release
working-directory: ./admin
Expand All @@ -36,12 +32,12 @@ jobs:
working-directory: ./admin
- name: Zip Functions Package
run: zip -r ../deploy.zip ./
working-directory: ./admin/TwoWeeksReady.Admin/bin/Release/net5.0/publish/
working-directory: ./admin/TwoWeeksReady.Admin/bin/Release/net6.0/publish/
- name: Upload Deployment Zip
uses: actions/upload-artifact@v2
with:
name: deployment_zip
path: ./admin/TwoWeeksReady.Admin/bin/Release/net5.0/deploy.zip
path: ./admin/TwoWeeksReady.Admin/bin/Release/net6.0/deploy.zip
- name: Upload Deployment Script
uses: actions/upload-artifact@v2
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:
- 'api/**'
- 'TwoWeeksReady.Common/**'
- '.github/workflows/api.yaml'
branches: [ master ]
branches: [ main ]
pull_request:
paths:
- 'api/**'
- '.github/workflows/api.yaml'
branches: [ master ]
branches: [ main ]
workflow_dispatch:
jobs:
build:
Expand All @@ -21,7 +21,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
dotnet-version: 6.0.x
- name: Build
run: dotnet build -c Release
working-directory: ./api
Expand All @@ -30,12 +30,12 @@ jobs:
working-directory: ./api
- name: Zip Functions Package
run: zip -r ../deploy.zip ./
working-directory: ./api/TwoWeeksReady/bin/Release/netcoreapp3.1/publish/
working-directory: ./api/TwoWeeksReady/bin/Release/net6.0/publish/
- name: Upload Deployment Zip
uses: actions/upload-artifact@v2
with:
name: deployment_zip
path: ./api/TwoWeeksReady/bin/Release/netcoreapp3.1/deploy.zip
path: ./api/TwoWeeksReady/bin/Release/net6.0/deploy.zip
- name: Upload Deployment Script
uses: actions/upload-artifact@v2
with:
Expand Down
13 changes: 7 additions & 6 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

## Prerequisites

[.NET Core SDK 3.1](https://dotnet.microsoft.com/download)
[.NET SDK 6.0](https://dotnet.microsoft.com/download)

[Azure Functions Core Tools 3](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=windows%2Ccsharp%2Cbash#install-the-azure-functions-core-tools)
[Azure Functions Core Tools 4](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=windows%2Ccsharp%2Cbash#install-the-azure-functions-core-tools)

`npm i -g azure-functions-core-tools@3 --unsafe-perm true`
`npm i -g azure-functions-core-tools@4 --unsafe-perm true`

### Using VS Code

Expand All @@ -24,11 +24,11 @@ Alternatively, there is an Azurite VS Code Extension:

[Install Azure Extension](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azurite#install-and-run-the-azurite-visual-studio-code-extension)

### Using Visual Studio 2019
### Using Visual Studio 2022

Open the `api.sln` in Visual Studio 2019.
Open the `api.sln` in Visual Studio 2022.

You will also need the Azure Storage Emulator if using Visual Studio 2019 (if you're using VS Code, look above).
You will also need the Azure Storage Emulator if using Visual Studio 2022 (if you're using VS Code, look above).

[Install Azure Storage Emulator](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-emulator?toc=/azure/storage/blobs/toc.json#get-the-storage-emulator)

Expand Down Expand Up @@ -64,6 +64,7 @@ Create a `local.settings.json` file in the TwoWeeksReady project folder. You wil
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"OidcApiAuthSettings:Audience": "https://2wrdev.azurewebsites.net",
"OidcApiAuthSettings:IssuerUrl": "https://login.2wr.org/"
Expand Down
12 changes: 6 additions & 6 deletions api/TwoWeeksReady/TwoWeeksReady.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.8.3" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.10" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.CosmosDB" Version="3.0.7" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.9" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.10.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.0.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.CosmosDB" Version="3.0.10" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.0" />
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="AzureFunctions.OidcAuthentication" Version="1.0.4" />
Expand Down