Skip to content

Commit

Permalink
Merge branch 'master' into IOAPPX-422-IOMarkdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Vangaorth authored Dec 19, 2024
2 parents 29230e3 + dc66860 commit f1535ca
Show file tree
Hide file tree
Showing 50 changed files with 872 additions and 130 deletions.
17 changes: 13 additions & 4 deletions .github/actions/setup-composite/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Actions to setup environment for all workflows
description: 'This action collects the steps to setup any job'
description: "This action collects the steps to setup any job"
runs:
using: "composite"
steps:
Expand All @@ -9,7 +9,7 @@ runs:
- id: setup-node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
with:
node-version-file: '.node-version'
node-version-file: ".node-version"
- id: yarn-cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
Expand All @@ -20,9 +20,18 @@ runs:
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
shell: bash
- id: generate-api-client
run: yarn generate
shell: bash
shell: bash
- id: upload-locales-artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8
with:
name: locales
path: locales/
- id: upload-clients-artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8
with:
name: api-client
path: definitions/
32 changes: 0 additions & 32 deletions .github/scripts/package-name-replacer.sh

This file was deleted.

32 changes: 0 additions & 32 deletions .github/scripts/package-name-restore.sh

This file was deleted.

70 changes: 27 additions & 43 deletions .github/workflows/release-canary.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,46 @@
name: Canary release
on:
workflow_dispatch:
issue_comment:
types: [created, edited, deleted]
types: [created]
jobs:
run-static-checks:
if: contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/canary')
uses: ./.github/workflows/staticcheck.yaml
prepare-canary-release:
needs: run-static-checks
environment: canary
runs-on: ubuntu-latest
outputs:
currentAppVersion: ${{ steps.store-current-version.outputs.CURRENT_APP_VERSION }}
currentAppBuildCode: ${{ steps.store-current-version.outputs.CURRENT_APP_BUILD_CODE }}
canaryVersion: ${{ steps.github-release-creation.outputs.CANARY_VERSION }}
steps:
- id: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2
with:
fetch-depth: 0
- id: store-current-version
run: |
APP_VERSION=$(node -p -e "require('./package.json').version")
echo "CURRENT_APP_VERSION=$APP_VERSION" >> $GITHUB_OUTPUT
BUILD_CODE=$(node ./scripts/canary/readAndroidBuildCode.js)
echo "CURRENT_APP_BUILD_CODE=$BUILD_CODE" >> $GITHUB_OUTPUT
- id: setup
uses: ./.github/actions/setup-composite
- id: replace-version-with-canary
run: |
node scripts/canary/replaceCanaryVersion.js ${{ vars.CANARY_VERSION }} ${{ vars.CANARY_BUILD_CODE }}
bash ./.github/scripts/package-name-replacer.sh it.pagopa.io.app it.pagopa.io.app.canary android
bash ./.github/scripts/package-name-replacer.sh it.pagopa.app.io it.pagopa.app.io.canary ios
bash ./.github/scripts/package-name-replacer.sh "git\@github.com:pagopa\/IO-App-certs.git" "git\@github.com:pagopa\/IO-App-canary-certs.git" ios
UPDATED_BUILD_CODE=$(git rev-list HEAD --count)
node scripts/canary/replaceCanaryVersion.js $UPDATED_BUILD_CODE
mv ios/fastlane/Matchfile ios/fastlane/Matchfile_prod
mv ios/fastlane/Matchfile_canary ios/fastlane/Matchfile
- id: bump-version
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .; git commit -m "Replace Matchfile for canary" --no-verify;
yarn release-canary
- id: push-tags
run: |
git push --no-verify --follow-tags origin HEAD:${{ github.head_ref }}
APP_VERSION=$(node -p -e "require('./package.json').version")
git push --no-verify origin tag $APP_VERSION
- id: github-release-creation
run: |
APP_VERSION=$(node -p -e "require('./package.json').version")
gh release create "(Canary) $APP_VERSION" --generate-notes
gh variable set CANARY_VERSION -b "$APP_VERSION" -e canary
BUILD_CODE=$(node ./scripts/canary/readAndroidBuildCode.js)
gh variable set CANARY_BUILD_CODE -b "$BUILD_CODE" -e canary
gh release create $APP_VERSION --generate-notes
echo "CANARY_VERSION=$APP_VERSION" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-android:
needs: prepare-canary-release
environment: canary
Expand All @@ -55,7 +50,7 @@ jobs:
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2
with:
fetch-depth: 0
ref: ${{ needs.prepare-canary-release.outputs.currentAppVersion }}
ref: ${{ needs.prepare-canary-release.outputs.canaryVersion }}
- id: setup
uses: ./.github/actions/setup-composite
- id: setup-jdk-17
Expand All @@ -73,7 +68,7 @@ jobs:
- id: build-release-android
run: |
./scripts/android-release.sh ./android/app
cd android && bundle exec fastlane alpha
cd android && bundle exec fastlane alpha_canary
shell: bash
env:
RUBYOPT: '-rostruct' # TODO: Remove when https://github.com/fastlane/fastlane/pull/21950 gets released
Expand All @@ -93,7 +88,7 @@ jobs:
cd android
VERSION_CODE=$(sed -n 's/.*versionCode \(.*\)/\1/p' "app/build.gradle")
echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
bundle exec fastlane download_apk
bundle exec fastlane download_canary_apk
env:
RUBYOPT: '-rostruct' # TODO: Remove when https://github.com/fastlane/fastlane/pull/21950 gets released
ENCODED_IOAPP_JSON_KEY_FILE: ${{ secrets.ENCODED_IOAPP_JSON_KEY_FILE }}
Expand All @@ -103,20 +98,20 @@ jobs:
continue-on-error: true
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8
with:
name: io-app-universal.apk
path: android/io-app-universal.apk
name: io-app-canary-universal.apk
path: android/io-app-canary-universal.apk
- id: upload-aab
# We don't want to fail whole job if the AAB upload step fails
continue-on-error: true
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8
with:
name: app-release.aab
path: android/app/build/outputs/bundle/release/app-release.aab
name: app-canary-release.aab
path: android/app/build/outputs/bundle/canaryRelease/app-canary-release.aab
- id: upload-android-assets-release
continue-on-error: true
run: |
APP_VERSION=$(node -p -e "require('./package.json').version")
gh release upload "(Canary) $APP_VERSION" android/app/build/outputs/bundle/release/app-release.aab#android-app-release.aab android/io-app-universal.apk#io-app-universal.apk
gh release upload $APP_VERSION android/app/build/outputs/bundle/canaryRelease/app-canary-release.aab#android-app-canary-release.aab android/io-app-canary-universal.apk#io-app-canary-universal.apk
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-ios:
Expand All @@ -131,7 +126,7 @@ jobs:
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2
with:
fetch-depth: 0
ref: ${{ needs.prepare-canary-release.outputs.currentAppVersion }}
ref: ${{ needs.prepare-canary-release.outputs.canaryVersion }}
- id: setup
uses: ./.github/actions/setup-composite
- id: setup-ruby
Expand All @@ -158,7 +153,7 @@ jobs:
name: Build & submit to App store
run: |
cd ios
bundle exec fastlane beta_circleci_testflight
bundle exec fastlane canary_ci_testflight
env:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
Expand Down Expand Up @@ -189,7 +184,7 @@ jobs:
continue-on-error: true
run: |
APP_VERSION=$(node -p -e "require('./package.json').version")
gh release upload "(Canary) $APP_VERSION" ios/IO.ipa#IO-iOS.ipa
gh release upload $APP_VERSION ios/IO.ipa#IO-canary-iOS.ipa
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
notify-new-version:
Expand All @@ -201,20 +196,9 @@ jobs:
steps:
- id: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2
- id: revert-package-and-version
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
node scripts/canary/replaceCanaryVersion.js ${{ needs.prepare-canary-release.outputs.currentAppVersion }} ${{ needs.prepare-canary-release.outputs.currentAppBuildCode }}
bash ./.github/scripts/package-name-restore.sh it.pagopa.io.app.canary it.pagopa.io.app android
bash ./.github/scripts/package-name-restore.sh it.pagopa.app.io.canary it.pagopa.app.io ios
bash ./.github/scripts/package-name-replacer.sh "git\@github.com:pagopa\/IO-App-canary-certs.git" "git\@github.com:pagopa\/IO-App-certs.git" ios
git add .
git commit -m "revert: restoring repository to default package name and version" --no-verify
git push --no-verify origin HEAD:${{ github.head_ref }}
- id: comment-process-end
if: github.event.issue.number
run: |
gh issue comment ${{ github.event.issue.number }} -b "Release correctly created, check it at the [release list](https://github.com/pagopa/io-app/releases)"
gh issue comment ${{ github.event.issue.number }} -b "Release correctly created, [${{ needs.prepare-canary-release.outputs.canaryVersion }}](https://github.com/pagopa/io-app/releases/tag/${{ needs.prepare-canary-release.outputs.canaryVersion }})"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ jobs:
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8
with:
name: app-release.aab
path: android/app/build/outputs/bundle/release/app-release.aab
path: android/app/build/outputs/bundle/productionRelease/app-production-release.aab
- id: upload-android-assets-release
continue-on-error: true
run: |
APP_VERSION=$(node -p -e "require('./package.json').version")
gh release upload $APP_VERSION android/app/build/outputs/bundle/release/app-release.aab#android-app-release.aab android/io-app-universal.apk#io-app-universal.apk
gh release upload $APP_VERSION android/app/build/outputs/bundle/productionRelease/app-production-release.aab#android-app-release.aab android/io-app-universal.apk#io-app-universal.apk
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-ios:
Expand Down
41 changes: 37 additions & 4 deletions .github/workflows/staticcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ on:
- pull_request
- workflow_call
jobs:
checks:
static-checks:
runs-on: ubuntu-latest
environment: dev
concurrency:
group: ${{ github.workflow }}-pr-staticcheck-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand All @@ -19,9 +18,43 @@ jobs:
run: yarn lint
- id: run-prettier
run: yarn prettier:check
unit-test:
runs-on: ubuntu-latest
environment: dev
needs: static-checks
strategy:
matrix:
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
steps:
- id: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- id: setup-node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version-file: ".node-version"
- id: yarn-cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
- id: install-packages
run: yarn install --frozen-lockfile
- id: download-locales
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
name: locales
path: locales/
- id: download-api-client
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
name: api-client
path: definitions/
- id: run-test
run: yarn test:ci
run: yarn test:ci --shard=${{ matrix.shard }}/${{ strategy.job-total }}
- id: codecov-script
uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed # v4.3.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.80.0-rc.5](https://github.com/pagopa/io-app/compare/2.80.0-rc.4...2.80.0-rc.5) (2024-12-18)


### Bug Fixes

* [[IOPLT-812](https://pagopa.atlassian.net/browse/IOPLT-812)] Exclude lib riscv64 on android build ([#6564](https://github.com/pagopa/io-app/issues/6564)) ([a06dc5f](https://github.com/pagopa/io-app/commit/a06dc5fe334debf7a1e3578982c3acf8748ee454)), closes [/github.com/mrousavy/react-native-vision-camera/issues/3177#issuecomment-2385366758](https://github.com/pagopa//github.com/mrousavy/react-native-vision-camera/issues/3177/issues/issuecomment-2385366758)


### Chores

* **Cross:** [[IOAPPX-206](https://pagopa.atlassian.net/browse/IOAPPX-206)] Add dynamic card effect based on device rotation ([#5715](https://github.com/pagopa/io-app/issues/5715)) ([c959d6a](https://github.com/pagopa/io-app/commit/c959d6abcc2d6dc98e02f75f4d8ab5f352325d16))
* **Cross:** [[IOAPPX-437](https://pagopa.atlassian.net/browse/IOAPPX-437)] Add support for Material You by adding a new adaptive launcher icon for Android ([#6434](https://github.com/pagopa/io-app/issues/6434)) ([db8121f](https://github.com/pagopa/io-app/commit/db8121f10c29843ac706f9fc2bfe2abbab89a4ba))

## [2.80.0-rc.4](https://github.com/pagopa/io-app/compare/2.80.0-rc.3...2.80.0-rc.4) (2024-12-18)


### Bug Fixes

* ffi version mismatch on linux environment ([#6563](https://github.com/pagopa/io-app/issues/6563)) ([082241e](https://github.com/pagopa/io-app/commit/082241eec664fb751b5bc7b8289469326b663167))

## [2.80.0-rc.3](https://github.com/pagopa/io-app/compare/2.80.0-rc.2...2.80.0-rc.3) (2024-12-17)


Expand Down
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ ruby '>=2.6.10'
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem "fastlane", "~> 2.223.1"

# fixes an issue on linux env for android release
# see https://github.com/ffi/ffi/issues/1103#issuecomment-2186974923
gem "ffi", "< 1.17.0"
Loading

0 comments on commit f1535ca

Please sign in to comment.