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

ci: fix app signing #185

Merged
merged 1 commit into from
Jan 2, 2024
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
16 changes: 8 additions & 8 deletions .github/workflows/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ jobs:
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
Expand All @@ -19,9 +19,9 @@ jobs:
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
Expand Down Expand Up @@ -57,9 +57,9 @@ jobs:
TEST_DB_DATABASE: "abrechnung"
TEST_DB_PASSWORD: "password"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -70,9 +70,9 @@ jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
Expand Down
24 changes: 11 additions & 13 deletions .github/workflows/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Nodejs
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
Expand All @@ -27,9 +27,9 @@ jobs:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Nodejs
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
Expand All @@ -45,9 +45,9 @@ jobs:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Nodejs
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
Expand All @@ -63,9 +63,9 @@ jobs:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Nodejs
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
Expand All @@ -81,10 +81,9 @@ jobs:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v3

- uses: actions/checkout@v4
- name: Set up Nodejs
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
Expand All @@ -109,7 +108,6 @@ jobs:
uses: gradle/gradle-build-action@v2

- name: Write gradle.properties to include signing key configuration for android release build
if: ${{ !failure() && !cancelled() && startsWith(github.ref, 'refs/heads/master')}}
env:
KEYSTORE: ${{ secrets.ANDROID_KEYSTORE_B64 }}
KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEY_STORE_ALIAS }}
Expand All @@ -129,7 +127,7 @@ jobs:
run: npx nx build-android mobile --tasks assembleRelease

- name: Upload APK
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: app-release-apk
path: frontend/apps/mobile/android/app/build/outputs/apk/release/app-release.apk
2 changes: 2 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
jobs:
build_and_test_frontend:
uses: ./.github/workflows/frontend.yaml
secrets: inherit

build_and_test_backend:
uses: ./.github/workflows/backend.yaml
secrets: inherit
22 changes: 12 additions & 10 deletions .github/workflows/push_on_master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ env:
jobs:
build_and_test_frontend:
uses: ./.github/workflows/frontend.yaml
secrets: inherit

build_and_test_backend:
uses: ./.github/workflows/backend.yaml
secrets: inherit

get-distros:
name: "Calculate list of debian distros and docker image tags"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- id: set-distros
run: |
# if we're running from a tag, get the full list of distros; otherwise just use debian:sid
Expand All @@ -47,9 +49,9 @@ jobs:
needs:
- get-distros
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: Set up Nodejs
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
Expand Down Expand Up @@ -112,7 +114,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: src

Expand All @@ -130,7 +132,7 @@ jobs:
restore-keys: |
${{ runner.os }}-buildx-
- name: Set up python
uses: actions/setup-python@v2
uses: actions/setup-python@v5

- name: Build the packages
# see https://github.com/docker/build-push-action/issues/252
Expand All @@ -145,7 +147,7 @@ jobs:
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Upload debs as artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: debs
path: debs/*
Expand All @@ -161,7 +163,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
- name: Trigger demo deployment via webhook
run: curl ${{ secrets.DEMO_DEPLOY_WEBHOOK_URL }} -F "archive=@$(find -name 'abrechnung_*bookworm*_amd64.deb')" --fail

Expand All @@ -176,15 +178,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
- name: Attach to release
uses: softprops/action-gh-release@a929a66f232c1b11af63782948aa2210f981808a # PR#109
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
debs/*.deb
frontend/apps/mobile/android/app/build/outputs/apk/release/app-release.apk
app-release-apk/app-release.apk
# if it's not already published, keep the release as a draft.
draft: true
# mark it as a prerelease if the tag contains 'rc'.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { toISODateString } from "@abrechnung/utils";
import { createAsyncThunk, createSlice, Draft, PayloadAction } from "@reduxjs/toolkit";
import memoize from "proxy-memoize";
import { leaveGroup } from "../groups";
import { IRootState, ITransactionRootState, StateStatus, TransactionSliceState, TransactionState } from "../types";
import { IRootState, StateStatus, TransactionSliceState, TransactionState } from "../types";
import { addEntity, getGroupScopedState, removeEntity } from "../utils";

export const initializeGroupState = (state: Draft<TransactionSliceState>, groupId: number) => {
Expand Down
Loading