From 6b5098e15cab8021ff52af1ec9e8ca07e9accbd0 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Thu, 6 Jun 2024 04:02:10 +0200 Subject: [PATCH 1/3] IOS-6122: Add `publish release` workflow Signed-off-by: Andrey Fedorov --- .github/workflows/publish_release.yml | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/publish_release.yml diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml new file mode 100644 index 0000000..176fb4f --- /dev/null +++ b/.github/workflows/publish_release.yml @@ -0,0 +1,42 @@ +name: Publish release +run-name: Publish new release with changes from commit '${{ github.event.head_commit.message }}' (${{ github.sha }}) +on: + push: + branches: + # - 'main' # TODO: Uncomment + - 'test/IOS-6122_build_scripts' # TODO: remove since the default branch ('main') should be used as a target + +jobs: + create_tag_and_release: + name: Create tag and release + runs-on: ubuntu-latest + concurrency: + group: ${{ github.ref }}_create_tag_and_release + cancel-in-progress: true + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Extract tag name from the commit message + id: extract_tag_name + env: + LATEST_COMMIT_MESSAGE: ${{ github.event.head_commit.message }} + run: | + # Extract the very last part of the commit message (in parentheses) + RELEASE_TAG_NAME=$(echo $LATEST_COMMIT_MESSAGE | awk -F'[()]' '{print $(NF-1)}' | sed 's/[()]//g'); + # Check if the string is empty + if [ -z "${RELEASE_TAG_NAME}" ]; then + echo "Can't extract release tag name from the commit message '${LATEST_COMMIT_MESSAGE}'" + exit 1 + fi + # Pass extracted tag name back to the GH actions pipeline + echo "release_tag_name=${RELEASE_TAG_NAME}" >> $GITHUB_OUTPUT + + - name: Create tag and release + uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5 + with: + tag_name: ${{ steps.extract_tag_name.outputs.release_tag_name }} + token: ${{ secrets.GITHUB_TOKEN }} + generate_release_notes: true + make_latest: true + target_commitish: 'test/IOS-6122_build_scripts' # TODO: remove since the default branch ('main') should be used as a target From 22ff0df310034ba1285a58698abb5bb6c4a290d8 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Fri, 14 Jun 2024 10:48:58 +0200 Subject: [PATCH 2/3] IOS-6122: Remove all TODOs and temp code from workflows Signed-off-by: Andrey Fedorov --- .github/workflows/publish_release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index 176fb4f..8131d8b 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -3,8 +3,7 @@ run-name: Publish new release with changes from commit '${{ github.event.head_co on: push: branches: - # - 'main' # TODO: Uncomment - - 'test/IOS-6122_build_scripts' # TODO: remove since the default branch ('main') should be used as a target + - 'main' jobs: create_tag_and_release: @@ -39,4 +38,3 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} generate_release_notes: true make_latest: true - target_commitish: 'test/IOS-6122_build_scripts' # TODO: remove since the default branch ('main') should be used as a target From df007b7bf1fa617bb825f6189b6abfafa2b93d94 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Fri, 14 Jun 2024 10:49:09 +0200 Subject: [PATCH 3/3] IOS-6122: Update readme Signed-off-by: Andrey Fedorov --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index dfe21d9..4413100 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ # Building and updating +###Deprecated, all builds are done by CI + 1. Clone [Trust Wallet Core fork](https://github.com/tangem/wallet-core) 2. Install the required dependencies by following [the official guide](https://developer.trustwallet.com/wallet-core/building). 3. [Optional] Update **SwiftProtobuf** library: