Compare commits

...

1 commit

Author SHA1 Message Date
Vadim
a3f8b49549 returned release notes to release workflow 2024-10-07 20:17:10 +02:00

View file

@ -18,12 +18,19 @@ on:
description: "Version" description: "Version"
required: true required: true
type: string type: string
release-notes:
description: "Release notes"
required: true
type: string
run-integration-tests: run-integration-tests:
description: "Run integration tests" description: "Run integration tests"
required: true required: true
type: boolean type: boolean
default: true default: true
env:
RELEASE_NOTES_FILE: release_notes_en_${{ inputs.version }}
jobs: jobs:
run-integration-tests: run-integration-tests:
name: Run integration tests name: Run integration tests
@ -56,9 +63,24 @@ jobs:
stage-backend: false stage-backend: false
version: ${{ inputs.version }} version: ${{ inputs.version }}
generate-release-notes:
name: Generate release notes
needs: [build-android, build-ios]
runs-on: ubuntu-latest
steps:
- name: Generate release notes
run: |
echo ${{ inputs.release-notes }} > ${{ env.RELEASE_NOTES_FILE }}.md
perl -i -pe 's/\s{1}(-{1})/\n$1/g' ${{ env.RELEASE_NOTES_FILE }}.md
- name: Upload merged_native_libs.zip to artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.RELEASE_NOTES_FILE }}
path: ${{ env.RELEASE_NOTES_FILE }}.md
create-github-release: create-github-release:
name: Create Github release name: Create Github release
needs: [build-android, build-ios] needs: [generate-release-notes]
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: write contents: write
@ -70,6 +92,14 @@ jobs:
- name: Increment build number & replace version number - name: Increment build number & replace version number
run: bash ./.github/scripts/increment_build_number.sh ${{ github.event.inputs.version }} run: bash ./.github/scripts/increment_build_number.sh ${{ github.event.inputs.version }}
- name: Download release notes
uses: actions/download-artifact@v3
with:
name: ${{ env.RELEASE_NOTES_FILE }}
- name: Move release notes to a folder
run: mv assets/release_notes/${{ env.RELEASE_NOTES_FILE }}.md ${{ env.RELEASE_NOTES_FILE }}
- name: Commit changes - name: Commit changes
run: | run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.email "github-actions[bot]@users.noreply.github.com"
@ -97,11 +127,11 @@ jobs:
artifacts: "m3_lightmeter.apk" artifacts: "m3_lightmeter.apk"
skipIfReleaseExists: true skipIfReleaseExists: true
tag: "v${{ github.event.inputs.version }}" tag: "v${{ github.event.inputs.version }}"
bodyFile: "assets/release_notes/release_notes_en_${{ inputs.version }}.md" bodyFile: "${{ env.RELEASE_NOTES_FILE }}.md"
create-google-play-release: create-google-play-release:
name: Create Google Play release name: Create Google Play release
needs: [build-android, build-ios] needs: [generate-release-notes]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -118,11 +148,16 @@ jobs:
unzip app-prod-release.aab unzip app-prod-release.aab
(cd base/lib && zip -r "$OLDPWD/merged_native_libs.zip" .) (cd base/lib && zip -r "$OLDPWD/merged_native_libs.zip" .)
- name: Download release notes
uses: actions/download-artifact@v3
with:
name: ${{ env.RELEASE_NOTES_FILE }}
- name: Move release notes to a folder - name: Move release notes to a folder
run: | run: |
mv assets/release_notes/release_notes_en_${{ inputs.version }}.md whatsnew-en-US mv assets/release_notes/${{ env.RELEASE_NOTES_FILE }}.md ${{ env.RELEASE_NOTES_FILE }}
mkdir whatsnew mkdir whatsnew
mv whatsnew-en-US whatsnew mv ${{ env.RELEASE_NOTES_FILE }} whatsnew
# https://unix.stackexchange.com/questions/13466/can-grep-output-only-specified-groupings-that-match' # https://unix.stackexchange.com/questions/13466/can-grep-output-only-specified-groupings-that-match'
# https://stackoverflow.com/questions/74353311/github-workflow-unable-to-process-file-command-env-successfully # https://stackoverflow.com/questions/74353311/github-workflow-unable-to-process-file-command-env-successfully
@ -147,7 +182,7 @@ jobs:
upload-to-app-store: upload-to-app-store:
name: Upload to App Store name: Upload to App Store
needs: [build-android, build-ios] needs: [generate-release-notes]
runs-on: macos-13 runs-on: macos-13
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -177,4 +212,4 @@ jobs:
m3_lightmeter_apk m3_lightmeter_apk
m3_lightmeter_appbundle m3_lightmeter_appbundle
m3_lightmeter_ipa m3_lightmeter_ipa
whatsnew-en-US ${{ env.RELEASE_NOTES_FILE }}