fix(api): fix cash withdrawl/deposit transaction import from Nordigen… #592
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: [ master ] | |
tags: [ v*.*.* ] | |
paths-ignore: | |
- '**.md' | |
- 'docs/**' | |
env: | |
DOTNET_NOLOGO: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
jobs: | |
build-windows: | |
name: Build for Windows | |
runs-on: windows-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
- uses: actions/setup-dotnet@v4.0.1 | |
- run: $env:BUILD_TAG = "-nightly" | |
if: ${{ !(startsWith(github.ref, 'refs/tags/')) }} | |
- name: Cache NuGet packages | |
uses: actions/cache@v4.1.1 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
- run: dotnet restore --locked-mode /p:Configuration="Release" | |
- name: Publish desktop application | |
run: > | |
deployment/publish.ps1 | |
"Gnomeshade.Desktop" | |
"win-x64" | |
"${{ github.run_number }}" | |
$env:BUILD_TAG | |
- name: Build installer | |
id: publish | |
run: deployment/build.ps1 "Gnomeshade.Desktop.Installer" | |
- uses: actions/upload-artifact@v4.4.3 | |
with: | |
name: ${{ steps.publish.outputs.artifact-name }} | |
path: ${{ steps.publish.outputs.artifact }} | |
build-linux: | |
strategy: | |
matrix: | |
project: | |
- Gnomeshade.Desktop | |
- Gnomeshade.WebApi | |
name: Build for Linux | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
- uses: actions/setup-dotnet@v4.0.1 | |
- uses: actions/setup-node@v4.0.4 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
cache-dependency-path: 'source/Gnomeshade.WebApi/Node/package-lock.json' | |
- run: echo "BUILD_TAG=-nightly" | |
if: ${{ !(startsWith(github.ref, 'refs/tags/')) }} | |
- name: Cache NuGet packages | |
uses: actions/cache@v4.1.1 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
- name: Publish project | |
id: publish | |
run: > | |
deployment/publish.sh | |
"${{ matrix.project }}" | |
"linux-x64" | |
"${{ github.run_number }}" | |
"-nightly" | |
- uses: actions/upload-artifact@v4.4.3 | |
with: | |
name: ${{ steps.publish.outputs.artifact-name }} | |
path: ${{ steps.publish.outputs.artifact }} | |
build-deb: | |
name: Build debian package | |
needs: build-linux | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
- uses: actions/download-artifact@v4.1.8 | |
id: download | |
with: | |
name: Gnomeshade.WebApi_linux-x64.zip | |
- name: Build debian package | |
run: > | |
deployment/debian.sh | |
"${{ steps.download.outputs.download-path }}/Gnomeshade.WebApi_linux-x64.zip" | |
"${{ github.run_number }}" | |
- uses: actions/upload-artifact@v4.4.3 | |
with: | |
name: Gnomeshade.WebApi_linux-x64.deb | |
path: "**/*.deb" | |
nuget: | |
name: Publish NuGet packages | |
runs-on: ubuntu-latest | |
concurrency: release-nuget | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
- uses: actions/setup-dotnet@v4.0.1 | |
- name: Cache NuGet packages | |
uses: actions/cache@v4.1.1 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
- name: Pack package | |
id: pack | |
run: deployment/pack-nightly.sh "Gnomeshade.WebApi.Client" "${{ github.run_number }}" "${{ github.ref }}" | |
- name: Push package to GitHub | |
run: > | |
dotnet nuget push "${{ steps.pack.outputs.artifact }}" | |
--api-key ${{ secrets.GITHUB_TOKEN }} | |
--source https://nuget.pkg.github.com/VMelnalksnis/index.json | |
- name: Push package to NuGet | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: > | |
dotnet nuget push "${{ steps.pack.outputs.artifact }}" | |
--api-key ${{ secrets.NUGET_KEY }} | |
--source https://api.nuget.org/v3/index.json | |
docker-release: | |
name: Build docker image | |
runs-on: ubuntu-latest | |
concurrency: release-docker-release | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
- uses: docker/login-action@v3.3.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- run: ./deployment/docker_push.sh "${{ github.run_number }}" "nightly" | |
if: ${{ !(startsWith(github.ref, 'refs/tags/')) }} | |
- run: ./deployment/docker_push.sh "${{ github.run_number }}" | |
if: ${{ (startsWith(github.ref, 'refs/tags/')) }} | |
deploy-demo: | |
name: Deploy demo app | |
needs: build-linux | |
runs-on: ubuntu-latest | |
concurrency: deploy-demo | |
timeout-minutes: 10 | |
env: | |
AZURE_APP_NAME: gnomeshade-demo | |
AZURE_APP_DOMAIN: 'https://gnomeshade-demo.azurewebsites.net/' | |
steps: | |
- uses: actions/download-artifact@v4.1.8 | |
id: download | |
with: | |
name: Gnomeshade.WebApi_linux-x64.zip | |
- run: unzip Gnomeshade.WebApi_linux-x64.zip | |
- run: rm Gnomeshade.WebApi_linux-x64.zip | |
- uses: azure/login@v2.2.0 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- uses: azure/webapps-deploy@v2 | |
with: | |
app-name: ${{ env.AZURE_APP_NAME }} | |
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} | |
package: '.' | |
- uses: azure/cli@v2.1.0 | |
name: Update appservice settings | |
with: | |
inlineScript: > | |
az webapp config appsettings set | |
--resource-group | |
${{ secrets.AZURE_RESOURCE_GROUP }} | |
--name | |
${{ env.AZURE_APP_NAME }} | |
--settings | |
Admin__Password="${{ secrets.DEMO_ADMIN_PASSWORD }}" | |
ConnectionStrings__Gnomeshade="Data Source=/tmp/gnomeshade.db" | |
Database__Provider="Sqlite" | |
Jwt__Secret="${{ secrets.DEMO_JWT_SECRET }}" | |
Jwt__ValidAudience="${{ env.AZURE_APP_DOMAIN }}" | |
Jwt__ValidIssuer="${{ env.AZURE_APP_DOMAIN }}" | |
OAuth__GitHub__ClientId="${{ secrets.DEMO_GITHUB_ID }}" | |
OAuth__GitHub__ClientSecret="${{ secrets.DEMO_GITHUB_SECRET }}" | |
GNOMESHADE_DEMO="true" | |
- run: wget --retry-connrefused --retry-on-http-error=502 --waitretry=5 --read-timeout=120 --timeout=120 -t 5 ${{ env.AZURE_APP_DOMAIN }} | |
create-release: | |
name: Create release | |
needs: | |
- build-windows | |
- build-linux | |
- build-deb | |
runs-on: ubuntu-latest | |
concurrency: create-release | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/download-artifact@v4.1.8 | |
id: download | |
with: | |
path: artifacts | |
- name: Upload artifact to nightly release | |
if: ${{ !(startsWith(github.ref, 'refs/tags/')) }} | |
uses: pyTooling/Actions/releaser/composite@v1.1.0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: nightly | |
rm: true | |
files: | | |
${{ steps.download.outputs.download-path }}/**/*.zip | |
${{ steps.download.outputs.download-path }}/**/*.deb | |
${{ steps.download.outputs.download-path }}/**/*.msi | |
- name: Create release | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
uses: softprops/action-gh-release@v2.0.8 | |
with: | |
draft: true | |
prerelease: false | |
tag_name: ${{ github.ref_name }} | |
generate_release_notes: true | |
fail_on_unmatched_files: true | |
files: | | |
${{ steps.download.outputs.download-path }}/**/*.zip | |
${{ steps.download.outputs.download-path }}/**/*.deb | |
${{ steps.download.outputs.download-path }}/**/*.msi |