From 20c1d10ad6809d6175d989c967392ea69b95d3e3 Mon Sep 17 00:00:00 2001 From: Bruno Campos Date: Thu, 29 Aug 2024 17:38:47 -0300 Subject: [PATCH 1/7] fix wasm package in pull master release action --- .github/workflows/pull-master-release.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-master-release.yaml b/.github/workflows/pull-master-release.yaml index e297ac5..a44af45 100644 --- a/.github/workflows/pull-master-release.yaml +++ b/.github/workflows/pull-master-release.yaml @@ -72,6 +72,9 @@ jobs: - name: Build run: make webpack-npm + - name: Package kos-js + run: zip -r ./demo/kos-js.zip ./demo/kos + - name: Capture Release Notes id: release_notes run: | @@ -82,7 +85,7 @@ jobs: - name: Create GitHub Release run: | VERSION=$(cat VERSION) - gh release create "v$VERSION" ./demo/kos --title "Release v$VERSION" --notes "${{ steps.release_notes.outputs.notes }}" + gh release create "v$VERSION" ./demo/kos-js.zip --title "Release v$VERSION" --notes "${{ steps.release_notes.outputs.notes }}" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 0d102df6aecf23c9051a7bd0c2197f47f72fd3c0 Mon Sep 17 00:00:00 2001 From: Bruno Campos Date: Thu, 29 Aug 2024 17:44:38 -0300 Subject: [PATCH 2/7] update webpack package in demo --- demo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/package.json b/demo/package.json index d7991cb..e8aa124 100644 --- a/demo/package.json +++ b/demo/package.json @@ -11,7 +11,7 @@ "http-server": "^14.1.1", "rimraf": "^3.0.0", "rust-wasm-loader": "^0.2.0", - "webpack": "^4.46.0", + "webpack": "^5.94.0", "webpack-cli": "^3.1.2", "webpack-dev-server": "^3.1.10" } From 4629e151c314ac0ec93a0a689eeb26671d5d6054 Mon Sep 17 00:00:00 2001 From: Bruno Campos Date: Thu, 29 Aug 2024 17:53:00 -0300 Subject: [PATCH 3/7] fix load env in pull develop action --- .github/workflows/pull-develop.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-develop.yaml b/.github/workflows/pull-develop.yaml index 0d22d1d..26b17f7 100644 --- a/.github/workflows/pull-develop.yaml +++ b/.github/workflows/pull-develop.yaml @@ -47,8 +47,9 @@ jobs: cargo pants - name: Restore .env file - run: | - echo "${{ vars.NODES_ENV }}" > packages/kos-sdk/.env.nodes + run: echo $NODES_ENV | base64 -d > packages/kos-sdk/.env.nodes + env: + NODES_ENV: ${{ secrets.NODES_ENV }} - name: Run Tests run: cargo test From 7ff9f808aff44ec654dc0541d3d1301f464b1d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Falc=C3=A3o?= <35662363+daniellfalcao@users.noreply.github.com> Date: Thu, 29 Aug 2024 17:53:58 -0300 Subject: [PATCH 4/7] Update publish-ios.yaml --- .github/workflows/publish-ios.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-ios.yaml b/.github/workflows/publish-ios.yaml index 1d7f824..ca8c2d5 100644 --- a/.github/workflows/publish-ios.yaml +++ b/.github/workflows/publish-ios.yaml @@ -73,6 +73,7 @@ jobs: run: | brew install jq TAG_NAME=${GITHUB_REF#refs/tags/} + TAG_NAME=${TAG_NAME#v} RELEASE_NAME="${{ github.event.release.name }}" RELEASE_BODY="${{ github.event.release.body }}" PRERELEASE=${{ github.event.release.prerelease }} @@ -88,4 +89,4 @@ jobs: "draft": false, "prerelease": '"${PRERELEASE}"' }' \ - https://api.github.com/repos/klever-io/kos-rs-xcframework/releases \ No newline at end of file + https://api.github.com/repos/klever-io/kos-rs-xcframework/releases From 9ac302a61cfb75872027053cbee2bfcf65fd787a Mon Sep 17 00:00:00 2001 From: Bruno Campos Date: Thu, 29 Aug 2024 18:01:09 -0300 Subject: [PATCH 5/7] env in quotes in pull master action --- .github/workflows/pull-master-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-master-release.yaml b/.github/workflows/pull-master-release.yaml index a44af45..79288d0 100644 --- a/.github/workflows/pull-master-release.yaml +++ b/.github/workflows/pull-master-release.yaml @@ -31,7 +31,7 @@ jobs: with_cache: true - name: Restore .env file - run: echo $NODES_ENV | base64 -d > packages/kos-sdk/.env.nodes + run: echo "$NODES_ENV" | base64 -d > packages/kos-sdk/.env.nodes env: NODES_ENV: ${{ secrets.NODES_ENV }} From 21f636c1b28e685e82e868770427622b20d682bb Mon Sep 17 00:00:00 2001 From: Bruno Campos Date: Thu, 29 Aug 2024 18:02:58 -0300 Subject: [PATCH 6/7] var in quotes in action run --- .github/workflows/pull-develop.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-develop.yaml b/.github/workflows/pull-develop.yaml index 26b17f7..992e8f6 100644 --- a/.github/workflows/pull-develop.yaml +++ b/.github/workflows/pull-develop.yaml @@ -47,7 +47,7 @@ jobs: cargo pants - name: Restore .env file - run: echo $NODES_ENV | base64 -d > packages/kos-sdk/.env.nodes + run: echo "$NODES_ENV" | base64 -d > packages/kos-sdk/.env.nodes env: NODES_ENV: ${{ secrets.NODES_ENV }} From a6e8b7824949ed01f6929c6c91dd8202864dc010 Mon Sep 17 00:00:00 2001 From: Bruno Campos Date: Thu, 29 Aug 2024 18:13:49 -0300 Subject: [PATCH 7/7] handled error inside run actions --- .github/workflows/pull-master-release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-master-release.yaml b/.github/workflows/pull-master-release.yaml index 79288d0..c4eff79 100644 --- a/.github/workflows/pull-master-release.yaml +++ b/.github/workflows/pull-master-release.yaml @@ -73,7 +73,7 @@ jobs: run: make webpack-npm - name: Package kos-js - run: zip -r ./demo/kos-js.zip ./demo/kos + run: zip -r ./demo/kos-js.zip ./demo/kos || { echo 'Packaging failed'; exit 1; } - name: Capture Release Notes id: release_notes @@ -85,7 +85,7 @@ jobs: - name: Create GitHub Release run: | VERSION=$(cat VERSION) - gh release create "v$VERSION" ./demo/kos-js.zip --title "Release v$VERSION" --notes "${{ steps.release_notes.outputs.notes }}" + gh release create "v$VERSION" ./demo/kos-js.zip --title "Release v$VERSION" --notes "${{ steps.release_notes.outputs.notes }}" || { echo 'Release creation failed'; exit 1; } env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}