From 0f840b92f7248e5855be1a88a869b34810e6cd24 Mon Sep 17 00:00:00 2001 From: neodiX Date: Thu, 23 Jan 2025 17:35:24 +0400 Subject: [PATCH 1/5] add create-tolk-release.yml --- .github/workflows/create-release.yml | 10 ++ .github/workflows/create-tolk-release.yml | 153 ++++++++++++++++++++++ 2 files changed, 163 insertions(+) create mode 100644 .github/workflows/create-tolk-release.yml diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 04f81a248..871c7aef0 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -17,6 +17,7 @@ jobs: workflow: ton-x86-64-linux.yml path: artifacts workflow_conclusion: success + branch: master skip_unpack: true - name: Download and unzip Linux x86-64 artifacts @@ -25,6 +26,7 @@ jobs: workflow: ton-x86-64-linux.yml path: artifacts workflow_conclusion: success + branch: master skip_unpack: false - name: Download Mac x86-64 artifacts @@ -33,6 +35,7 @@ jobs: workflow: ton-x86-64-macos.yml path: artifacts workflow_conclusion: success + branch: master skip_unpack: true - name: Download Mac arm64 artifacts @@ -41,6 +44,7 @@ jobs: workflow: ton-arm64-macos.yml path: artifacts workflow_conclusion: success + branch: master skip_unpack: true - name: Download and unzip Mac x86-64 artifacts @@ -49,6 +53,7 @@ jobs: workflow: ton-x86-64-macos.yml path: artifacts workflow_conclusion: success + branch: master skip_unpack: false - name: Download and unzip arm64 artifacts @@ -57,6 +62,7 @@ jobs: workflow: ton-arm64-macos.yml path: artifacts workflow_conclusion: success + branch: master skip_unpack: false - name: Download Windows artifacts @@ -65,6 +71,7 @@ jobs: workflow: ton-x86-64-windows.yml path: artifacts workflow_conclusion: success + branch: master skip_unpack: true - name: Download and unzip Windows artifacts @@ -73,6 +80,7 @@ jobs: workflow: ton-x86-64-windows.yml path: artifacts workflow_conclusion: success + branch: master skip_unpack: false - name: Download WASM artifacts @@ -81,6 +89,7 @@ jobs: workflow: build-ton-wasm-emscripten.yml path: artifacts workflow_conclusion: success + branch: master skip_unpack: true - name: Download Android Tonlib artifacts @@ -89,6 +98,7 @@ jobs: workflow: build-ton-linux-android-tonlib.yml path: artifacts workflow_conclusion: success + branch: master skip_unpack: true - name: Show all artifacts diff --git a/.github/workflows/create-tolk-release.yml b/.github/workflows/create-tolk-release.yml new file mode 100644 index 000000000..a4e359119 --- /dev/null +++ b/.github/workflows/create-tolk-release.yml @@ -0,0 +1,153 @@ +name: Create tolk release + +on: + workflow_dispatch: + inputs: + tag: + description: 'tolk release and tag name' + required: true + +permissions: write-all + +jobs: + create-release: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v3 + + - name: Download and unzip Linux arm64 artifacts + uses: dawidd6/action-download-artifact@v6 + with: + workflow: build-ton-linux-arm64-appimage.yml + path: artifacts + workflow_conclusion: success + branch: master + skip_unpack: false + + - name: Download and unzip Linux x86-64 artifacts + uses: dawidd6/action-download-artifact@v6 + with: + workflow: build-ton-linux-x86-64-appimage.yml + path: artifacts + workflow_conclusion: success + branch: master + skip_unpack: false + + - name: Download and unzip Mac x86-64 artifacts + uses: dawidd6/action-download-artifact@v6 + with: + workflow: build-ton-macos-13-x86-64-portable.yml + path: artifacts + workflow_conclusion: success + branch: master + skip_unpack: false + + - name: Download and unzip arm64 artifacts + uses: dawidd6/action-download-artifact@v6 + with: + workflow: build-ton-macos-14-arm64-portable.yml + path: artifacts + workflow_conclusion: success + branch: master + skip_unpack: false + + - name: Download and unzip Windows artifacts + uses: dawidd6/action-download-artifact@v6 + with: + workflow: ton-x86-64-windows.yml + path: artifacts + workflow_conclusion: success + branch: master + skip_unpack: false + + - name: Download WASM artifacts + uses: dawidd6/action-download-artifact@v6 + with: + workflow: build-ton-wasm-emscripten.yml + path: artifacts + workflow_conclusion: success + branch: master + skip_unpack: true + + - name: Show all artifacts + run: | + tree artifacts + + + # create release + - name: Get registration token + id: getRegToken + run: | + curl -X POST -H \"Accept: application/vnd.github+json\" -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' https://api.github.com/repos/ton-blockchain/ton/actions/runners/registration-token + + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ inputs.tag }} + release_name: ${{ inputs.tag }} + draft: false + prerelease: false + + # upload + + # win + + - name: Upload Windows 2019 single artifact - tolk + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-x86-64-windows/tolk.exe + asset_name: tolk.exe + tag: ${{ steps.tag.outputs.TAG }} + + # mac x86-64 + + - name: Upload Mac x86-64 single artifact - tolk + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-x86_64-macos/tolk + asset_name: tolk-mac-x86-64 + tag: ${{ steps.tag.outputs.TAG }} + + # mac arm64 + + - name: Upload Mac arm64 single artifact - tolk + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-arm64-macos/tolk + asset_name: tolk-mac-arm64 + tag: ${{ steps.tag.outputs.TAG }} + + # linux x86-64 + + - name: Upload Linux x86-64 single artifact - tolk + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-x86_64-linux/tolk + asset_name: tolk-linux-x86_64 + tag: ${{ steps.tag.outputs.TAG }} + + # linux arm64 + + - name: Upload Linux arm64 single artifact - tolk + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-arm64-linux/tolk + asset_name: tolk-linux-arm64 + tag: ${{ steps.tag.outputs.TAG }} + + - name: Upload WASM artifacts + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: artifacts/ton-wasm.zip + asset_name: ton-wasm.zip + tag: ${{ steps.tag.outputs.TAG }} From 45f194c3dc37cb66e11078f8ea7d5f14733555ed Mon Sep 17 00:00:00 2001 From: neodiX Date: Thu, 23 Jan 2025 17:41:43 +0400 Subject: [PATCH 2/5] adjust create-tolk-release for old workflows --- .github/workflows/create-tolk-release.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/create-tolk-release.yml b/.github/workflows/create-tolk-release.yml index a4e359119..5ebb62ad7 100644 --- a/.github/workflows/create-tolk-release.yml +++ b/.github/workflows/create-tolk-release.yml @@ -16,19 +16,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Download and unzip Linux arm64 artifacts - uses: dawidd6/action-download-artifact@v6 - with: - workflow: build-ton-linux-arm64-appimage.yml - path: artifacts - workflow_conclusion: success - branch: master - skip_unpack: false - - name: Download and unzip Linux x86-64 artifacts uses: dawidd6/action-download-artifact@v6 with: - workflow: build-ton-linux-x86-64-appimage.yml + workflow: ton-x86-64-linux.yml path: artifacts workflow_conclusion: success branch: master @@ -37,7 +28,7 @@ jobs: - name: Download and unzip Mac x86-64 artifacts uses: dawidd6/action-download-artifact@v6 with: - workflow: build-ton-macos-13-x86-64-portable.yml + workflow: ton-x86-64-macos.yml path: artifacts workflow_conclusion: success branch: master @@ -46,7 +37,7 @@ jobs: - name: Download and unzip arm64 artifacts uses: dawidd6/action-download-artifact@v6 with: - workflow: build-ton-macos-14-arm64-portable.yml + workflow: ton-arm64-macos.yml path: artifacts workflow_conclusion: success branch: master From e067ac2b9872f60ef1839a45a76f5acf904330e7 Mon Sep 17 00:00:00 2001 From: neodiX Date: Thu, 23 Jan 2025 17:45:47 +0400 Subject: [PATCH 3/5] use custom tag --- .github/workflows/create-tolk-release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/create-tolk-release.yml b/.github/workflows/create-tolk-release.yml index 5ebb62ad7..95ca281ec 100644 --- a/.github/workflows/create-tolk-release.yml +++ b/.github/workflows/create-tolk-release.yml @@ -93,7 +93,7 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: artifacts/ton-x86-64-windows/tolk.exe asset_name: tolk.exe - tag: ${{ steps.tag.outputs.TAG }} + tag: ${{ inputs.tag }} # mac x86-64 @@ -103,7 +103,7 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: artifacts/ton-x86_64-macos/tolk asset_name: tolk-mac-x86-64 - tag: ${{ steps.tag.outputs.TAG }} + tag: ${{ inputs.tag }} # mac arm64 @@ -113,7 +113,7 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: artifacts/ton-arm64-macos/tolk asset_name: tolk-mac-arm64 - tag: ${{ steps.tag.outputs.TAG }} + tag: ${{ inputs.tag }} # linux x86-64 @@ -123,7 +123,7 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: artifacts/ton-x86_64-linux/tolk asset_name: tolk-linux-x86_64 - tag: ${{ steps.tag.outputs.TAG }} + tag: ${{ inputs.tag }} # linux arm64 @@ -133,7 +133,7 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: artifacts/ton-arm64-linux/tolk asset_name: tolk-linux-arm64 - tag: ${{ steps.tag.outputs.TAG }} + tag: ${{ inputs.tag }} - name: Upload WASM artifacts uses: svenstaro/upload-release-action@v2 @@ -141,4 +141,4 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: artifacts/ton-wasm.zip asset_name: ton-wasm.zip - tag: ${{ steps.tag.outputs.TAG }} + tag: ${{ inputs.tag }} From 758bdc1dc969888fcb3d1ea0e94aeea3721051c3 Mon Sep 17 00:00:00 2001 From: neodiX Date: Thu, 23 Jan 2025 17:53:27 +0400 Subject: [PATCH 4/5] use old names --- .github/workflows/create-tolk-release.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/create-tolk-release.yml b/.github/workflows/create-tolk-release.yml index 95ca281ec..61471aae1 100644 --- a/.github/workflows/create-tolk-release.yml +++ b/.github/workflows/create-tolk-release.yml @@ -91,7 +91,7 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: artifacts/ton-x86-64-windows/tolk.exe + file: artifacts/ton-win-binaries/tolk.exe asset_name: tolk.exe tag: ${{ inputs.tag }} @@ -101,7 +101,7 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: artifacts/ton-x86_64-macos/tolk + file: artifacts/ton-x86_64-macos-binaries/tolk asset_name: tolk-mac-x86-64 tag: ${{ inputs.tag }} @@ -111,7 +111,7 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: artifacts/ton-arm64-macos/tolk + file: artifacts/ton-arm64-macos-binaries/tolk asset_name: tolk-mac-arm64 tag: ${{ inputs.tag }} @@ -121,20 +121,10 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: artifacts/ton-x86_64-linux/tolk + file: artifacts/ton-x86_64-linux-binaries/tolk asset_name: tolk-linux-x86_64 tag: ${{ inputs.tag }} - # linux arm64 - - - name: Upload Linux arm64 single artifact - tolk - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: artifacts/ton-arm64-linux/tolk - asset_name: tolk-linux-arm64 - tag: ${{ inputs.tag }} - - name: Upload WASM artifacts uses: svenstaro/upload-release-action@v2 with: From 4f784c0ee2bb4733c04b9ae4d568def1a6e0aab1 Mon Sep 17 00:00:00 2001 From: neodiX Date: Thu, 23 Jan 2025 17:56:02 +0400 Subject: [PATCH 5/5] use old names --- .github/workflows/create-tolk-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-tolk-release.yml b/.github/workflows/create-tolk-release.yml index 61471aae1..bddb5b651 100644 --- a/.github/workflows/create-tolk-release.yml +++ b/.github/workflows/create-tolk-release.yml @@ -129,6 +129,6 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: artifacts/ton-wasm.zip + file: artifacts/ton-wasm-binaries.zip asset_name: ton-wasm.zip tag: ${{ inputs.tag }}