From 4d04bcc02e5099838f7c951c6aabfb74e21b29d4 Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Fri, 8 May 2020 01:12:43 +0300 Subject: [PATCH 01/19] Update CryptoNoteConfig.h --- src/CryptoNoteConfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CryptoNoteConfig.h b/src/CryptoNoteConfig.h index 4506f667c9..c0d192ef24 100644 --- a/src/CryptoNoteConfig.h +++ b/src/CryptoNoteConfig.h @@ -73,7 +73,7 @@ const char MINER_CONFIG_FILE_NAME[] = "miner_conf.json" } // parameters //TODO Put here the name of your currency -const char CRYPTONOTE_NAME[] = ""; +const char CRYPTONOTE_NAME[] = "SDGCOIN"; const char GENESIS_COINBASE_TX_HEX[] = ""; const uint8_t CURRENT_TRANSACTION_VERSION = 1; From 3069c28c1db1f8c67d17be73c8c9405383a76b47 Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Fri, 8 May 2020 01:20:00 +0300 Subject: [PATCH 02/19] Update CMakeLists.txt --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b02ec2896e..1b74de3c10 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -80,4 +80,4 @@ set_property(TARGET SimpleWallet PROPERTY OUTPUT_NAME "simplewallet") set_property(TARGET PaymentGateService PROPERTY OUTPUT_NAME "walletd") set_property(TARGET Miner PROPERTY OUTPUT_NAME "miner") #TODO Specify the name of daemon for your currency -set_property(TARGET Daemon PROPERTY OUTPUT_NAME "cryptonoted") +set_property(TARGET Daemon PROPERTY OUTPUT_NAME "SDGCoin") From e4011e942accdeee6ed35b59e506308e2b3394a3 Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Fri, 8 May 2020 01:24:05 +0300 Subject: [PATCH 03/19] Update CryptoNoteConfig.h --- src/CryptoNoteConfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CryptoNoteConfig.h b/src/CryptoNoteConfig.h index c0d192ef24..552e96dbe2 100644 --- a/src/CryptoNoteConfig.h +++ b/src/CryptoNoteConfig.h @@ -73,7 +73,7 @@ const char MINER_CONFIG_FILE_NAME[] = "miner_conf.json" } // parameters //TODO Put here the name of your currency -const char CRYPTONOTE_NAME[] = "SDGCOIN"; +const char CRYPTONOTE_NAME[] = "SDGCoin"; const char GENESIS_COINBASE_TX_HEX[] = ""; const uint8_t CURRENT_TRANSACTION_VERSION = 1; From fc2af6b8f975fa469ba07c1e4af45b6d3e2949ca Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Fri, 8 May 2020 02:02:23 +0300 Subject: [PATCH 04/19] Set up CI with Azure Pipelines test [skip ci] --- azure-pipelines.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..a0a2462928 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,30 @@ +# Universal Windows Platform +# Build a Universal Windows Platform project using Visual Studio. +# Add steps that test and distribute an app, save build artifacts, and more: +# https://aka.ms/yaml + +trigger: +- master + +pool: + vmImage: 'windows-latest' + +variables: + solution: '**/*.sln' + buildPlatform: 'x86|x64|ARM' + buildConfiguration: 'Release' + appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\' + +steps: +- task: NuGetToolInstaller@1 + +- task: NuGetCommand@2 + inputs: + restoreSolution: '$(solution)' + +- task: VSBuild@1 + inputs: + platform: 'x86' + solution: '$(solution)' + configuration: '$(buildConfiguration)' + msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=StoreUpload' From 7206f8d359996f30f1548a0dfcb6b7ac29c4513f Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Fri, 8 May 2020 02:38:59 +0300 Subject: [PATCH 05/19] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a0a2462928..5fff2478ec 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,4 +1,9 @@ # Universal Windows Platform +- task: DotNetCoreCLI@2 + inputs: + command: 'build' + projects: 'alimohamedgo.SDGCoin' + arguments: 'alimohamedgo.SDGCoin' # Build a Universal Windows Platform project using Visual Studio. # Add steps that test and distribute an app, save build artifacts, and more: # https://aka.ms/yaml From 23e8c8a924d346ed57bb128304c585620a07877b Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Fri, 8 May 2020 02:49:47 +0300 Subject: [PATCH 06/19] Create azure.yml --- .github/workflows/azure.yml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/azure.yml diff --git a/.github/workflows/azure.yml b/.github/workflows/azure.yml new file mode 100644 index 0000000000..a638c4cb3e --- /dev/null +++ b/.github/workflows/azure.yml @@ -0,0 +1,46 @@ +# This workflow will build and push a node.js application to an Azure Web App when a release is created. +# +# This workflow assumes you have already created the target Azure App Service web app. +# For instructions see https://docs.microsoft.com/azure/app-service/app-service-plan-manage#create-an-app-service-plan +# +# To configure this workflow: +# +# 1. Set up a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE with the value of your Azure publish profile. +# For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret +# +# 2. Change the values for the AZURE_WEBAPP_NAME, AZURE_WEBAPP_PACKAGE_PATH and NODE_VERSION environment variables (below). +# +# For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions +# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples +on: + release: + types: [created] + +env: + AZURE_WEBAPP_NAME: your-app-name # set this to your application's name + AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root + NODE_VERSION: '10.x' # set this to the node version to use + +jobs: + build-and-deploy: + name: Build and Deploy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ env.NODE_VERSION }} + uses: actions/setup-node@v1 + with: + node-version: ${{ env.NODE_VERSION }} + - name: npm install, build, and test + run: | + # Build and test the project, then + # deploy to Azure Web App. + npm install + npm run build --if-present + npm run test --if-present + - name: 'Deploy to Azure WebApp' + uses: azure/webapps-deploy@v2 + with: + app-name: ${{ env.AZURE_WEBAPP_NAME }} + publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} + package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} From 12b76d577329548a6d439ba1d9b7e9c2b9dae9d2 Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Fri, 8 May 2020 03:10:47 +0300 Subject: [PATCH 07/19] Delete azure-pipelines.yml --- azure-pipelines.yml | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 5fff2478ec..0000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,35 +0,0 @@ -# Universal Windows Platform -- task: DotNetCoreCLI@2 - inputs: - command: 'build' - projects: 'alimohamedgo.SDGCoin' - arguments: 'alimohamedgo.SDGCoin' -# Build a Universal Windows Platform project using Visual Studio. -# Add steps that test and distribute an app, save build artifacts, and more: -# https://aka.ms/yaml - -trigger: -- master - -pool: - vmImage: 'windows-latest' - -variables: - solution: '**/*.sln' - buildPlatform: 'x86|x64|ARM' - buildConfiguration: 'Release' - appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\' - -steps: -- task: NuGetToolInstaller@1 - -- task: NuGetCommand@2 - inputs: - restoreSolution: '$(solution)' - -- task: VSBuild@1 - inputs: - platform: 'x86' - solution: '$(solution)' - configuration: '$(buildConfiguration)' - msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=StoreUpload' From 2049fee935ab32022fccfacc3c0823142629986b Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Fri, 8 May 2020 03:14:44 +0300 Subject: [PATCH 08/19] Create google.yml --- .github/workflows/google.yml | 75 ++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/google.yml diff --git a/.github/workflows/google.yml b/.github/workflows/google.yml new file mode 100644 index 0000000000..b8d1079527 --- /dev/null +++ b/.github/workflows/google.yml @@ -0,0 +1,75 @@ +# This workflow will build a docker container, publish it to Google Container Registry, and deploy it to GKE when a release is created +# +# To configure this workflow: +# +# 1. Ensure that your repository contains the necessary configuration for your Google Kubernetes Engine cluster, including deployment.yml, kustomization.yml, service.yml, etc. +# +# 2. Set up secrets in your workspace: GKE_PROJECT with the name of the project, GKE_EMAIL with the service account email, GKE_KEY with the Base64 encoded JSON service account key (https://github.com/GoogleCloudPlatform/github-actions/tree/docs/service-account-key/setup-gcloud#inputs). +# +# 3. Change the values for the GKE_ZONE, GKE_CLUSTER, IMAGE, REGISTRY_HOSTNAME and DEPLOYMENT_NAME environment variables (below). + +name: Build and Deploy to GKE + +on: + release: + types: [created] + +# Environment variables available to all jobs and steps in this workflow +env: + GKE_PROJECT: ${{ secrets.GKE_PROJECT }} + GKE_EMAIL: ${{ secrets.GKE_EMAIL }} + GITHUB_SHA: ${{ github.sha }} + GKE_ZONE: us-west1-a + GKE_CLUSTER: example-gke-cluster + IMAGE: gke-test + REGISTRY_HOSTNAME: gcr.io + DEPLOYMENT_NAME: gke-test + +jobs: + setup-build-publish-deploy: + name: Setup, Build, Publish, and Deploy + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v2 + + # Setup gcloud CLI + - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master + with: + version: '270.0.0' + service_account_email: ${{ secrets.GKE_EMAIL }} + service_account_key: ${{ secrets.GKE_KEY }} + + # Configure docker to use the gcloud command-line tool as a credential helper + - run: | + # Set up docker to authenticate + # via gcloud command-line tool. + gcloud auth configure-docker + + # Build the Docker image + - name: Build + run: | + docker build -t "$REGISTRY_HOSTNAME"/"$GKE_PROJECT"/"$IMAGE":"$GITHUB_SHA" \ + --build-arg GITHUB_SHA="$GITHUB_SHA" \ + --build-arg GITHUB_REF="$GITHUB_REF" . + + # Push the Docker image to Google Container Registry + - name: Publish + run: | + docker push $REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE:$GITHUB_SHA + + # Set up kustomize + - name: Set up Kustomize + run: | + curl -o kustomize --location https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64 + chmod u+x ./kustomize + + # Deploy the Docker image to the GKE cluster + - name: Deploy + run: | + gcloud container clusters get-credentials $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT + ./kustomize edit set image $REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE:${GITHUB_SHA} + ./kustomize build . | kubectl apply -f - + kubectl rollout status deployment/$DEPLOYMENT_NAME + kubectl get services -o wide From 1ed85a9b68a0a7a0f83901321f02e77b0dd11cc5 Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Fri, 8 May 2020 03:18:58 +0300 Subject: [PATCH 09/19] Create ccpp.yml --- .github/workflows/ccpp.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/ccpp.yml diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml new file mode 100644 index 0000000000..e3233268f7 --- /dev/null +++ b/.github/workflows/ccpp.yml @@ -0,0 +1,23 @@ +name: C/C++ CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: configure + run: ./configure + - name: make + run: make + - name: make check + run: make check + - name: make distcheck + run: make distcheck From 31f9d00fce901e11344218daf8a6fecde11802c9 Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Fri, 8 May 2020 04:24:04 +0300 Subject: [PATCH 10/19] Create nodejs.yml --- .github/workflows/nodejs.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/nodejs.yml diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000000..e772a1cd78 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,29 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present + - run: npm test From d75af28f708394eab022325107fea14669a55c69 Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Fri, 8 May 2020 22:52:08 +0300 Subject: [PATCH 11/19] Delete ccpp.yml --- .github/workflows/ccpp.yml | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 .github/workflows/ccpp.yml diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml deleted file mode 100644 index e3233268f7..0000000000 --- a/.github/workflows/ccpp.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: C/C++ CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: configure - run: ./configure - - name: make - run: make - - name: make check - run: make check - - name: make distcheck - run: make distcheck From 289f3358419981687e81a01e0958db88194e311f Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Fri, 8 May 2020 22:52:59 +0300 Subject: [PATCH 12/19] Delete nodejs.yml --- .github/workflows/nodejs.yml | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 .github/workflows/nodejs.yml diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml deleted file mode 100644 index e772a1cd78..0000000000 --- a/.github/workflows/nodejs.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Node.js CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [10.x, 12.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run build --if-present - - run: npm test From bc3ed6ff525c6bd1eedab1307b59076dcd840363 Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Fri, 8 May 2020 22:53:27 +0300 Subject: [PATCH 13/19] Delete google.yml --- .github/workflows/google.yml | 75 ------------------------------------ 1 file changed, 75 deletions(-) delete mode 100644 .github/workflows/google.yml diff --git a/.github/workflows/google.yml b/.github/workflows/google.yml deleted file mode 100644 index b8d1079527..0000000000 --- a/.github/workflows/google.yml +++ /dev/null @@ -1,75 +0,0 @@ -# This workflow will build a docker container, publish it to Google Container Registry, and deploy it to GKE when a release is created -# -# To configure this workflow: -# -# 1. Ensure that your repository contains the necessary configuration for your Google Kubernetes Engine cluster, including deployment.yml, kustomization.yml, service.yml, etc. -# -# 2. Set up secrets in your workspace: GKE_PROJECT with the name of the project, GKE_EMAIL with the service account email, GKE_KEY with the Base64 encoded JSON service account key (https://github.com/GoogleCloudPlatform/github-actions/tree/docs/service-account-key/setup-gcloud#inputs). -# -# 3. Change the values for the GKE_ZONE, GKE_CLUSTER, IMAGE, REGISTRY_HOSTNAME and DEPLOYMENT_NAME environment variables (below). - -name: Build and Deploy to GKE - -on: - release: - types: [created] - -# Environment variables available to all jobs and steps in this workflow -env: - GKE_PROJECT: ${{ secrets.GKE_PROJECT }} - GKE_EMAIL: ${{ secrets.GKE_EMAIL }} - GITHUB_SHA: ${{ github.sha }} - GKE_ZONE: us-west1-a - GKE_CLUSTER: example-gke-cluster - IMAGE: gke-test - REGISTRY_HOSTNAME: gcr.io - DEPLOYMENT_NAME: gke-test - -jobs: - setup-build-publish-deploy: - name: Setup, Build, Publish, and Deploy - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v2 - - # Setup gcloud CLI - - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master - with: - version: '270.0.0' - service_account_email: ${{ secrets.GKE_EMAIL }} - service_account_key: ${{ secrets.GKE_KEY }} - - # Configure docker to use the gcloud command-line tool as a credential helper - - run: | - # Set up docker to authenticate - # via gcloud command-line tool. - gcloud auth configure-docker - - # Build the Docker image - - name: Build - run: | - docker build -t "$REGISTRY_HOSTNAME"/"$GKE_PROJECT"/"$IMAGE":"$GITHUB_SHA" \ - --build-arg GITHUB_SHA="$GITHUB_SHA" \ - --build-arg GITHUB_REF="$GITHUB_REF" . - - # Push the Docker image to Google Container Registry - - name: Publish - run: | - docker push $REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE:$GITHUB_SHA - - # Set up kustomize - - name: Set up Kustomize - run: | - curl -o kustomize --location https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64 - chmod u+x ./kustomize - - # Deploy the Docker image to the GKE cluster - - name: Deploy - run: | - gcloud container clusters get-credentials $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT - ./kustomize edit set image $REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE:${GITHUB_SHA} - ./kustomize build . | kubectl apply -f - - kubectl rollout status deployment/$DEPLOYMENT_NAME - kubectl get services -o wide From bc85b95dc9902fe884d870f8ed710b4f0273ef97 Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Fri, 8 May 2020 22:58:00 +0300 Subject: [PATCH 14/19] Create wpfdotnet-core.yml --- .github/workflows/wpfdotnet-core.yml | 115 +++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 .github/workflows/wpfdotnet-core.yml diff --git a/.github/workflows/wpfdotnet-core.yml b/.github/workflows/wpfdotnet-core.yml new file mode 100644 index 0000000000..80ec3e5f0f --- /dev/null +++ b/.github/workflows/wpfdotnet-core.yml @@ -0,0 +1,115 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# This workflow will build, test and package a WPF desktop application +# built on .NET Core. +# To learn how to migrate your existing WPF application to .NET Core, +# refer to https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework +# +# To configure this workflow: +# +# 1. Configure environment variables +# GitHub sets default environment variables for every workflow run. +# Replace the variables relative to your project in the "env" section below. +# +# 2. Signing +# Generate a signing certificate in the Windows Application +# Packaging Project or add an existing signing certificate to the project. +# Next, use PowerShell to encode the .pfx file using Base64 encoding +# by running the following Powershell script to generate the output string: +# +# $pfx_cert = Get-Content '.\SigningCertificate.pfx' -Encoding Byte +# [System.Convert]::ToBase64String($pfx_cert) | Out-File 'SigningCertificate_Encoded.txt' +# +# Open the output file, SigningCertificate_Encoded.txt, and copy the +# string inside. Then, add the string to the repo as a GitHub secret +# and name it "Base64_Encoded_Pfx." +# For more information on how to configure your signing certificate for +# this workflow, refer to https://github.com/microsoft/github-actions-for-desktop-apps#signing +# +# Finally, add the signing certificate password to the repo as a secret and name it "Pfx_Key". +# See "Build the Windows Application Packaging project" below to see how the secret is used. +# +# For more information on GitHub Actions, refer to https://github.com/features/actions +# For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications, +# refer to https://github.com/microsoft/github-actions-for-desktop-apps + +name: WPF .NET Core + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + + strategy: + matrix: + configuration: [Debug, Release] + + runs-on: windows-latest # For a list of available runner types, refer to + # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on + + env: + Solution_Name: your-solution-name # Replace with your solution name, i.e. MyWpfApp.sln. + Test_Project_Path: your-test-project-path # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. + Wap_Project_Directory: your-wap-project-directory-name # Replace with the Wap project directory relative to the solution, i.e. MyWpfApp.Package. + Wap_Project_Path: your-wap-project-path # Replace with the path to your Wap project, i.e. MyWpf.App.Package\MyWpfApp.Package.wapproj. + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + # Install the .NET Core workload + - name: Install .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + + # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild + - name: Setup MSBuild.exe + uses: microsoft/setup-msbuild@2008f912f56e61277eefaac6d1888b750582aa16 + + # Execute all unit tests in the solution + - name: Execute unit tests + run: dotnet test + + # Restore the WPF application to populate the obj folder with RuntimeIdentifiers + - name: Restore the WPF application + run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration + env: + Configuration: ${{ matrix.configuration }} + + # Decode the base 64 encoded pfx and save the Signing_Certificate + - name: Decode the pfx + run: | + $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}") + $certificatePath = Join-Path -Path $env:Wap_Project_Directory -ChildPath GitHubActionsWorkflow.pfx + [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte) + + # Create the app package by building and packaging the Windows Application Packaging project + - name: Create the app package + run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:PackageCertificatePassword=${{ secrets.Pfx_Key }} + env: + Appx_Bundle: Always + Appx_Bundle_Platforms: x86|x64 + Appx_Package_Build_Mode: StoreUpload + Configuration: ${{ matrix.configuration }} + + # Remove the pfx + - name: Remove the pfx + run: Remove-Item -path $env:Wap_Project_Directory\$env:Signing_Certificate + + # Upload the MSIX package: https://github.com/marketplace/actions/upload-artifact + - name: Upload build artifacts + uses: actions/upload-artifact@v1 + with: + name: MSIX Package + path: ${{ env.Wap_Project_Directory }}\AppPackages From 7c21bbbee1bb213e6180a00f9999de2900018ef0 Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Sat, 9 May 2020 03:29:51 +0300 Subject: [PATCH 15/19] Delete azure.yml --- .github/workflows/azure.yml | 46 ------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 .github/workflows/azure.yml diff --git a/.github/workflows/azure.yml b/.github/workflows/azure.yml deleted file mode 100644 index a638c4cb3e..0000000000 --- a/.github/workflows/azure.yml +++ /dev/null @@ -1,46 +0,0 @@ -# This workflow will build and push a node.js application to an Azure Web App when a release is created. -# -# This workflow assumes you have already created the target Azure App Service web app. -# For instructions see https://docs.microsoft.com/azure/app-service/app-service-plan-manage#create-an-app-service-plan -# -# To configure this workflow: -# -# 1. Set up a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE with the value of your Azure publish profile. -# For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret -# -# 2. Change the values for the AZURE_WEBAPP_NAME, AZURE_WEBAPP_PACKAGE_PATH and NODE_VERSION environment variables (below). -# -# For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions -# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples -on: - release: - types: [created] - -env: - AZURE_WEBAPP_NAME: your-app-name # set this to your application's name - AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root - NODE_VERSION: '10.x' # set this to the node version to use - -jobs: - build-and-deploy: - name: Build and Deploy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@v1 - with: - node-version: ${{ env.NODE_VERSION }} - - name: npm install, build, and test - run: | - # Build and test the project, then - # deploy to Azure Web App. - npm install - npm run build --if-present - npm run test --if-present - - name: 'Deploy to Azure WebApp' - uses: azure/webapps-deploy@v2 - with: - app-name: ${{ env.AZURE_WEBAPP_NAME }} - publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} - package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} From 8a7abee501fde506505a8a9508301117fed65418 Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Sat, 9 May 2020 03:30:16 +0300 Subject: [PATCH 16/19] Create azure.yml From deba084e6b7f72d4455f693b68b8241ae8245681 Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Sat, 9 May 2020 04:07:19 +0300 Subject: [PATCH 17/19] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..6d417832f3 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,34 @@ +# ASP.NET +# Build and test ASP.NET projects. +# Add steps that publish symbols, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4 + +trigger: +- master + +pool: + vmImage: 'windows-latest' + +variables: + solution: '**/*.sln' + buildPlatform: 'Any CPU' + buildConfiguration: 'Release' + +steps: +- task: NuGetToolInstaller@1 + +- task: NuGetCommand@2 + inputs: + restoreSolution: '$(solution)' + +- task: VSBuild@1 + inputs: + solution: '$(solution)' + msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"' + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' + +- task: VSTest@2 + inputs: + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' From 0dd09e8357a76219a6e405c5292a7a0c12266e0d Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Sat, 9 May 2020 04:08:46 +0300 Subject: [PATCH 18/19] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines-1.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 azure-pipelines-1.yml diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml new file mode 100644 index 0000000000..a0a2462928 --- /dev/null +++ b/azure-pipelines-1.yml @@ -0,0 +1,30 @@ +# Universal Windows Platform +# Build a Universal Windows Platform project using Visual Studio. +# Add steps that test and distribute an app, save build artifacts, and more: +# https://aka.ms/yaml + +trigger: +- master + +pool: + vmImage: 'windows-latest' + +variables: + solution: '**/*.sln' + buildPlatform: 'x86|x64|ARM' + buildConfiguration: 'Release' + appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\' + +steps: +- task: NuGetToolInstaller@1 + +- task: NuGetCommand@2 + inputs: + restoreSolution: '$(solution)' + +- task: VSBuild@1 + inputs: + platform: 'x86' + solution: '$(solution)' + configuration: '$(buildConfiguration)' + msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=StoreUpload' From af0fa7df991df96a10d3bc6a4ba988ca28d077a6 Mon Sep 17 00:00:00 2001 From: alimohamedgo <35596459+alimohamedgo@users.noreply.github.com> Date: Sat, 9 May 2020 04:23:23 +0300 Subject: [PATCH 19/19] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines-2.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 azure-pipelines-2.yml diff --git a/azure-pipelines-2.yml b/azure-pipelines-2.yml new file mode 100644 index 0000000000..aa912913de --- /dev/null +++ b/azure-pipelines-2.yml @@ -0,0 +1,19 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + +trigger: +- master + +pool: + vmImage: 'ubuntu-latest' + +steps: +- script: echo Hello, world! + displayName: 'Run a one-line script' + +- script: | + echo Add other tasks to build, test, and deploy your project. + echo See https://aka.ms/yaml + displayName: 'Run a multi-line script'