Skip to content

- Add project API

- Add project API #2

Workflow file for this run

name: .NET Release
on:
push:
tags:
- '*.*.*'
jobs:
Release:
runs-on: ubuntu-latest
environment: Release
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup dotnet 7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.x'
- name: Update JSON File
run: |
# Get the new values from the previous step's outputs
clientid="${{ secrets.CLIENTID }}"
clientsecretid="${{ secrets.CLIENTSECRETID }}"
accesstoken="${{ secrets.ACCESSTOKEN }}"
refreshtoken="${{ secrets.CLIENTSECRETID }}"
# Update the JSON file using jq
jq --arg clientid "$clientid" --arg clientsecretid "$clientsecretid" '.ClientId = $clientid | .ClientSecretId = $clientsecretid' tests/appsettings.json > updated_appsettings.json
# Update the JSON file using jq
jq --arg accesstoken "$accesstoken" --arg refreshtoken "$refreshtoken" --arg refreshtoken "$refreshtoken" '.access_token = $accesstoken | .refresh_token = $refreshtoken' tests/basecamp.json > updated_basecamp.json
# Overwrite the original file with the updated contents
mv updated_appsettings.json tests/appsettings.json
mv updated_basecamp.json tests/basecamp.json
- name: Build and Test
run: ./build.ps1
shell: pwsh
- name: Push to NuGet
env:
NUGET_URL: https://api.nuget.org/v3/index.json
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: ./push.ps1
shell: pwsh
- name: Artifacts
uses: actions/upload-artifact@v2
with:
name: artifacts
path: artifacts/**/*