From 692b861072a9a75f75430e0297c2c3933bf6b055 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 14:15:24 -0400 Subject: [PATCH 01/89] Create wg-windows-build-publish-.yml --- .../workflows/wg-windows-build-publish-.yml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/wg-windows-build-publish-.yml diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml new file mode 100644 index 0000000..ad9778c --- /dev/null +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -0,0 +1,63 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "main" branch + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: [self-hosted, windows10] + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + + # This part here is cloning a second repository + # While cloning the repository: + # - it clones the repo into the given `path` + # - it checks out the branch defined at `ref` + - name: Clone supercharge docs repository + uses: actions/checkout@v3 + with: + repository: nymtech/wireguard-windows + ref: master + + # Runs a set of commands using the runners shell + - name: Run a multi-line script + run: | + .\build.bat, + .\installer\build.bat + + - name: wireguard-amd64 + uses: actions/upload-artifact@v3 + with: + name: wireguard-amd64-0.5.3.msi + path: installer\dist\wireguard-amd64-0.5.3.msi + retention-days: 1 + + - name: wireguard-arm64 + uses: actions/upload-artifact@v3 + with: + name: wireguard-arm64-0.5.3.msi + path: installer\dist\wireguard-arm64-0.5.3.msi + retention-days: 1 + + - name: wireguard-x86 + uses: actions/upload-artifact@v3 + with: + name: wireguard-x86-0.5.3.msi + path: installer\dist\wireguard-x86-0.5.3.msi + retention-days: 1 From b95257897ee6b4df79024feb32efb58b0b11e7d0 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 14:16:11 -0400 Subject: [PATCH 02/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index ad9778c..fdf3852 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -6,9 +6,9 @@ name: CI on: # Triggers the workflow on push or pull request events but only for the "main" branch push: - branches: [ "master" ] + branches: [ "main" ] pull_request: - branches: [ "master" ] + branches: [ "main" ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: From 4fb605d8ed75913f1876bdf672f6c7b0e312733d Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 14:17:31 -0400 Subject: [PATCH 03/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index fdf3852..d9cae1a 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -38,7 +38,7 @@ jobs: # Runs a set of commands using the runners shell - name: Run a multi-line script run: | - .\build.bat, + .\build.bat .\installer\build.bat - name: wireguard-amd64 From f2e805fcee80a756f3de5038e5fe99974ef1b8c4 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 14:51:57 -0400 Subject: [PATCH 04/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index d9cae1a..e9432c6 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -40,6 +40,8 @@ jobs: run: | .\build.bat .\installer\build.bat + env: + SigningCertificate : ${{ secrets.WINDOWS_CERTIFICATE }} - name: wireguard-amd64 uses: actions/upload-artifact@v3 From df598bb20deac8eb781d25f5dcfcc3a1ee965a0d Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 14:58:54 -0400 Subject: [PATCH 05/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index e9432c6..970b7a6 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -41,7 +41,7 @@ jobs: .\build.bat .\installer\build.bat env: - SigningCertificate : ${{ secrets.WINDOWS_CERTIFICATE }} + SigningCertificate: ${{ secrets.WINDOWS_CERTIFICATE }} - name: wireguard-amd64 uses: actions/upload-artifact@v3 From ffb10b509c0f7c54b1808a704bfcee40ab49acab Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 15:06:57 -0400 Subject: [PATCH 06/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 970b7a6..32eb1c8 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -22,6 +22,13 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: + # Clean up anything from previous build + - name: 'Cleanup build folder' + run: | + ls -la ./ + rm -rf ./* || true + rm -rf ./.??* || true + ls -la ./ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 @@ -34,7 +41,6 @@ jobs: with: repository: nymtech/wireguard-windows ref: master - # Runs a set of commands using the runners shell - name: Run a multi-line script run: | From 3e7f8303271567e8c9ce443c5929b9b42e0c8528 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 15:11:23 -0400 Subject: [PATCH 07/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 32eb1c8..259e46b 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -26,9 +26,7 @@ jobs: - name: 'Cleanup build folder' run: | ls -la ./ - rm -rf ./* || true - rm -rf ./.??* || true - ls -la ./ + rm -rf ./* # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 From c6ff5dfb19083e43c0eeaa19aacedf7f53ac7c6b Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 15:13:40 -0400 Subject: [PATCH 08/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 259e46b..b3b1eb4 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -25,8 +25,7 @@ jobs: # Clean up anything from previous build - name: 'Cleanup build folder' run: | - ls -la ./ - rm -rf ./* + rm -r .\* # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 From cb1fc1e527004e910e4574fc6e3d962fc27f6f0f Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 15:20:05 -0400 Subject: [PATCH 09/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index b3b1eb4..1dcc267 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -25,7 +25,7 @@ jobs: # Clean up anything from previous build - name: 'Cleanup build folder' run: | - rm -r .\* + rm -Recurse ${{github.workspace}}\* # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 From d6300b0e66c79937d60c0cd4758ea6b46960fb77 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 15:27:06 -0400 Subject: [PATCH 10/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 1dcc267..a730d16 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -22,12 +22,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Clean up anything from previous build - - name: 'Cleanup build folder' - run: | - rm -Recurse ${{github.workspace}}\* - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: TooMuch4U/runner-post-cleanup@v2.1 # This part here is cloning a second repository # While cloning the repository: From 7d25f60b1d146eda67ab212d054635f3b6cbe923 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 15:33:09 -0400 Subject: [PATCH 11/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index a730d16..2deceb6 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -61,3 +61,6 @@ jobs: name: wireguard-x86-0.5.3.msi path: installer\dist\wireguard-x86-0.5.3.msi retention-days: 1 + + - uses: colpal/actions-clean@v1 + if: ${{ always() }} From c94b344e2d31196cd5bf2386887a39494f0822f7 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 15:33:56 -0400 Subject: [PATCH 12/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 2deceb6..5a1a0e2 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -22,8 +22,6 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - uses: TooMuch4U/runner-post-cleanup@v2.1 - # This part here is cloning a second repository # While cloning the repository: # - it clones the repo into the given `path` From 3c3a459b648cdfc5410955857a27d01403475714 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 15:39:37 -0400 Subject: [PATCH 13/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 5a1a0e2..1705607 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -22,6 +22,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: + - uses: AutoModality/action-clean@v1 # This part here is cloning a second repository # While cloning the repository: # - it clones the repo into the given `path` @@ -59,6 +60,3 @@ jobs: name: wireguard-x86-0.5.3.msi path: installer\dist\wireguard-x86-0.5.3.msi retention-days: 1 - - - uses: colpal/actions-clean@v1 - if: ${{ always() }} From f33fa15339d4c423738b7a613dab7d6fc6446a96 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 15:52:41 -0400 Subject: [PATCH 14/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 1705607..1f8232e 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -22,7 +22,15 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - uses: AutoModality/action-clean@v1 + - name: Run a multi-line script + run: | + rm -r .\x86\ + rm -rf .\amd64\ + rm -rf .\arm64\ + rm -rf .\installer\dist\ + rm -rf .\installer\arm64\ + rm -rf .\installer\amd64\ + rm -rf .\installer\x86\ # This part here is cloning a second repository # While cloning the repository: # - it clones the repo into the given `path` From 57f2b26987af489669fbc8a1a175277e97c12abb Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 15:59:29 -0400 Subject: [PATCH 15/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 1f8232e..483f9a3 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -22,21 +22,12 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - name: Run a multi-line script - run: | - rm -r .\x86\ - rm -rf .\amd64\ - rm -rf .\arm64\ - rm -rf .\installer\dist\ - rm -rf .\installer\arm64\ - rm -rf .\installer\amd64\ - rm -rf .\installer\x86\ # This part here is cloning a second repository # While cloning the repository: # - it clones the repo into the given `path` # - it checks out the branch defined at `ref` - name: Clone supercharge docs repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: nymtech/wireguard-windows ref: master From 99a0f52d0a28ecaa2be9fb9f71eb11b576c68f1c Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 21:20:25 -0400 Subject: [PATCH 16/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 483f9a3..757d350 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -17,8 +17,9 @@ on: jobs: # This workflow contains a single job called "build" build: - # The type of runner that the job will run on - runs-on: [self-hosted, windows10] + # The type of runner that the job will run on + # remove windows11 tag for real runner + runs-on: [self-hosted, Windows, windows11] # Steps represent a sequence of tasks that will be executed as part of the job steps: From 002e9800f354e8fd4df9e3c7c2d5f9e4fc38e603 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 21:42:20 -0400 Subject: [PATCH 17/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 757d350..a03ae85 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -27,7 +27,7 @@ jobs: # While cloning the repository: # - it clones the repo into the given `path` # - it checks out the branch defined at `ref` - - name: Clone supercharge docs repository + - name: Clone wireguard-windows repo uses: actions/checkout@v4 with: repository: nymtech/wireguard-windows From 891c42b3bb5079e5ad0c8837ba518a059f0af89c Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 21:50:26 -0400 Subject: [PATCH 18/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index a03ae85..5d87dbd 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -60,3 +60,10 @@ jobs: name: wireguard-x86-0.5.3.msi path: installer\dist\wireguard-x86-0.5.3.msi retention-days: 1 + - name: cleanup runner workspace + run: | + echo $GITHUB_WORKSPACE + rm -r $GITHUB_WORKSPACE + mkdir $GITHUB_WORKSPACE + shell: bash + if: ${{ failure() && steps.checkout.conclusion == 'failure' }} From 18a5702614b461b91ca8d4233c19c4dc4eca2581 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 22:02:40 -0400 Subject: [PATCH 19/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 5d87dbd..a03ae85 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -60,10 +60,3 @@ jobs: name: wireguard-x86-0.5.3.msi path: installer\dist\wireguard-x86-0.5.3.msi retention-days: 1 - - name: cleanup runner workspace - run: | - echo $GITHUB_WORKSPACE - rm -r $GITHUB_WORKSPACE - mkdir $GITHUB_WORKSPACE - shell: bash - if: ${{ failure() && steps.checkout.conclusion == 'failure' }} From 3062da08f5157aee04c3569a2ac6abff2621b611 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 22:08:12 -0400 Subject: [PATCH 20/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index a03ae85..8c02474 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -32,6 +32,7 @@ jobs: with: repository: nymtech/wireguard-windows ref: master + clean: false # Runs a set of commands using the runners shell - name: Run a multi-line script run: | From 79dddd2d71b82d39f1523de30eec2dba4c505133 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 22:31:27 -0400 Subject: [PATCH 21/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 8c02474..0af416f 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -19,7 +19,7 @@ jobs: build: # The type of runner that the job will run on # remove windows11 tag for real runner - runs-on: [self-hosted, Windows, windows11] + runs-on: [self-hosted, Windows, windows11, noroot] # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -32,7 +32,6 @@ jobs: with: repository: nymtech/wireguard-windows ref: master - clean: false # Runs a set of commands using the runners shell - name: Run a multi-line script run: | From ea1b380dba82b0ac6ed4187f0806368775bc68ba Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 22:48:50 -0400 Subject: [PATCH 22/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 0af416f..31d0e53 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -32,6 +32,8 @@ jobs: with: repository: nymtech/wireguard-windows ref: master + clean: false + # Runs a set of commands using the runners shell - name: Run a multi-line script run: | From bb4125dd508044c790bcebb072a90a932a713425 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 22:52:26 -0400 Subject: [PATCH 23/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 31d0e53..579904e 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -41,6 +41,7 @@ jobs: .\installer\build.bat env: SigningCertificate: ${{ secrets.WINDOWS_CERTIFICATE }} + TimestampServer: http://timestamp.comodoca.com - name: wireguard-amd64 uses: actions/upload-artifact@v3 From 15c966768308876e0e942250b792ccedbb3d83ca Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Tue, 31 Oct 2023 23:06:41 -0400 Subject: [PATCH 24/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 579904e..cbafc9c 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -32,6 +32,8 @@ jobs: with: repository: nymtech/wireguard-windows ref: master + # have to set this to false because it fails to complete clean on windows self-hosted runner + # not sure how this will impact new build version changes clean: false # Runs a set of commands using the runners shell @@ -40,9 +42,12 @@ jobs: .\build.bat .\installer\build.bat env: + # this signing doesn't work. I think this needs to be a .cer and not a .pfx SigningCertificate: ${{ secrets.WINDOWS_CERTIFICATE }} + # not sure if this timestamp server will work, pulled from tauri docs TimestampServer: http://timestamp.comodoca.com - + + # will need to update these in the future to be dynamic for release version - name: wireguard-amd64 uses: actions/upload-artifact@v3 with: From 08a329eb662d17947adf2689e41ff2d943fb2ec0 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Wed, 1 Nov 2023 12:20:41 -0400 Subject: [PATCH 25/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index cbafc9c..8b7d9e1 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -44,6 +44,7 @@ jobs: env: # this signing doesn't work. I think this needs to be a .cer and not a .pfx SigningCertificate: ${{ secrets.WINDOWS_CERTIFICATE }} + SigningCertificatePassword: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} # not sure if this timestamp server will work, pulled from tauri docs TimestampServer: http://timestamp.comodoca.com From 28e959ff3b8bafad1a3194af5b72600780bb12da Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Wed, 1 Nov 2023 13:16:16 -0400 Subject: [PATCH 26/89] Update wg-windows-build-publish-.yml --- .../workflows/wg-windows-build-publish-.yml | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 8b7d9e1..78e4808 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -35,18 +35,23 @@ jobs: # have to set this to false because it fails to complete clean on windows self-hosted runner # not sure how this will impact new build version changes clean: false - + # Add sign cert to file + - name: Extract signing certificate + uses: mobiledevops/secret-to-file-action@v1 + with: + base64-encoded-secret: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} + filename: "signing.pfx" + working-directory: ${{ GITHUB_WORKSPACE }} # Runs a set of commands using the runners shell - - name: Run a multi-line script - run: | - .\build.bat - .\installer\build.bat + - name: Run build and signing env: - # this signing doesn't work. I think this needs to be a .cer and not a .pfx - SigningCertificate: ${{ secrets.WINDOWS_CERTIFICATE }} - SigningCertificatePassword: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} + SigningCertificate: "signing.pfx" + SigningCertificatePassword: ${{ secrets.WINDOWS_SIGNING_PFX_PASSWORD }} # not sure if this timestamp server will work, pulled from tauri docs TimestampServer: http://timestamp.comodoca.com + run: | + .\build.bat "%TimestampServer%" "%SigningCertificate%" "%SigningCertificatePassword%" + .\installer\build.bat "%TimestampServer%" "%SigningCertificate%" "%SigningCertificatePassword%" # will need to update these in the future to be dynamic for release version - name: wireguard-amd64 From 0acae2121a609ac7ee0ed49ff1f7ddab6be7dba2 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Wed, 1 Nov 2023 13:17:59 -0400 Subject: [PATCH 27/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 78e4808..c78042c 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -41,7 +41,7 @@ jobs: with: base64-encoded-secret: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} filename: "signing.pfx" - working-directory: ${{ GITHUB_WORKSPACE }} + working-directory: ${{ github.workspace }} # Runs a set of commands using the runners shell - name: Run build and signing env: From fbd0e2eac42f1d1f3bc5ae99625940d72e8f51f0 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Wed, 1 Nov 2023 13:29:46 -0400 Subject: [PATCH 28/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index c78042c..c30ad47 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -41,7 +41,7 @@ jobs: with: base64-encoded-secret: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} filename: "signing.pfx" - working-directory: ${{ github.workspace }} + working-directory: $GITHUB_WORKSPACE # Runs a set of commands using the runners shell - name: Run build and signing env: From ee85f6eace17cc620b3dc544b1ac649fd30a258c Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Wed, 1 Nov 2023 13:31:29 -0400 Subject: [PATCH 29/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index c30ad47..42ba2a1 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -41,7 +41,7 @@ jobs: with: base64-encoded-secret: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} filename: "signing.pfx" - working-directory: $GITHUB_WORKSPACE + working-directory: "./" # Runs a set of commands using the runners shell - name: Run build and signing env: From b24f4ac758953f9b6e996b3f45769a73b69616f7 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Wed, 1 Nov 2023 13:40:35 -0400 Subject: [PATCH 30/89] Update wg-windows-build-publish-.yml --- .../workflows/wg-windows-build-publish-.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 42ba2a1..18951fd 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -36,12 +36,19 @@ jobs: # not sure how this will impact new build version changes clean: false # Add sign cert to file - - name: Extract signing certificate - uses: mobiledevops/secret-to-file-action@v1 - with: - base64-encoded-secret: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} - filename: "signing.pfx" - working-directory: "./" + - name: Create signing.pfc from B64_SECRET1 + id: secret-file1 + run: | + $secretFile = Join-Path -Path $env:RUNNER_TEMP -ChildPath "signing.pfx"; + $encodedBytes = [System.Convert]::FromBase64String($env:SECRET_DATA1); + Set-Content $secretFile -Value $encodedBytes -AsByteStream; + $secretFileHash = Get-FileHash $secretFile; + Write-Output "::set-output name=SECRET_FILE::$secretFile"; + Write-Output "::set-output name=SECRET_FILE_HASH::$($secretFileHash.Hash)"; + Write-Output "Secret file $secretFile has hash $($secretFileHash.Hash)"; + shell: pwsh + env: + SECRET_DATA1: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} # Runs a set of commands using the runners shell - name: Run build and signing env: From 3a89a7da738517e92741e5d92ed40478080e391e Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Wed, 1 Nov 2023 13:50:57 -0400 Subject: [PATCH 31/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 18951fd..0fcda88 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -36,16 +36,11 @@ jobs: # not sure how this will impact new build version changes clean: false # Add sign cert to file - - name: Create signing.pfc from B64_SECRET1 + - name: Create signing.pfx from B64_SECRET1 id: secret-file1 run: | - $secretFile = Join-Path -Path $env:RUNNER_TEMP -ChildPath "signing.pfx"; $encodedBytes = [System.Convert]::FromBase64String($env:SECRET_DATA1); - Set-Content $secretFile -Value $encodedBytes -AsByteStream; - $secretFileHash = Get-FileHash $secretFile; - Write-Output "::set-output name=SECRET_FILE::$secretFile"; - Write-Output "::set-output name=SECRET_FILE_HASH::$($secretFileHash.Hash)"; - Write-Output "Secret file $secretFile has hash $($secretFileHash.Hash)"; + New-Item -Path ${{ github.workspace }} -name "signing.pfx" -Value $encodedBytes shell: pwsh env: SECRET_DATA1: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} From 1c8ddcb5dfdcba9cead2be78dd8a95685624ded2 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Wed, 1 Nov 2023 13:55:10 -0400 Subject: [PATCH 32/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 0fcda88..ec9772f 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -39,7 +39,7 @@ jobs: - name: Create signing.pfx from B64_SECRET1 id: secret-file1 run: | - $encodedBytes = [System.Convert]::FromBase64String($env:SECRET_DATA1); + $encodedBytes = [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($env:SECRET_DATA1)) New-Item -Path ${{ github.workspace }} -name "signing.pfx" -Value $encodedBytes shell: pwsh env: From 110ba29beb0d3cefd7662aebc09ca921e904e204 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Wed, 1 Nov 2023 14:01:13 -0400 Subject: [PATCH 33/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index ec9772f..e674a1c 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -52,8 +52,8 @@ jobs: # not sure if this timestamp server will work, pulled from tauri docs TimestampServer: http://timestamp.comodoca.com run: | - .\build.bat "%TimestampServer%" "%SigningCertificate%" "%SigningCertificatePassword%" - .\installer\build.bat "%TimestampServer%" "%SigningCertificate%" "%SigningCertificatePassword%" + .\build.bat %TimestampServer% %SigningCertificate% %SigningCertificatePassword% + .\installer\build.bat %TimestampServer% %SigningCertificate% %SigningCertificatePassword% # will need to update these in the future to be dynamic for release version - name: wireguard-amd64 From 21d4b67383d735a69cc8d8c791711da8458853ab Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Wed, 1 Nov 2023 14:04:14 -0400 Subject: [PATCH 34/89] Update wg-windows-build-publish-.yml --- .github/workflows/wg-windows-build-publish-.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index e674a1c..a10c885 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -39,8 +39,12 @@ jobs: - name: Create signing.pfx from B64_SECRET1 id: secret-file1 run: | - $encodedBytes = [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($env:SECRET_DATA1)) - New-Item -Path ${{ github.workspace }} -name "signing.pfx" -Value $encodedBytes + $FileName = "${{ github.workspace }}/signing.pfx" + if (Test-Path $FileName) { + Remove-Item $FileName + } + $data = [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($env:SECRET_DATA1)) + New-Item -Path ${{ github.workspace }} -name "signing.pfx" -Value $data shell: pwsh env: SECRET_DATA1: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} From aabf6f5e629bf78fa5cb176506cd68070fcdb3b1 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Wed, 1 Nov 2023 14:22:50 -0400 Subject: [PATCH 35/89] Update wg-windows-build-publish-.yml --- .../workflows/wg-windows-build-publish-.yml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index a10c885..dad95ae 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -23,18 +23,6 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - # This part here is cloning a second repository - # While cloning the repository: - # - it clones the repo into the given `path` - # - it checks out the branch defined at `ref` - - name: Clone wireguard-windows repo - uses: actions/checkout@v4 - with: - repository: nymtech/wireguard-windows - ref: master - # have to set this to false because it fails to complete clean on windows self-hosted runner - # not sure how this will impact new build version changes - clean: false # Add sign cert to file - name: Create signing.pfx from B64_SECRET1 id: secret-file1 @@ -48,6 +36,18 @@ jobs: shell: pwsh env: SECRET_DATA1: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} + # This part here is cloning a second repository + # While cloning the repository: + # - it clones the repo into the given `path` + # - it checks out the branch defined at `ref` + - name: Clone wireguard-windows repo + uses: actions/checkout@v4 + with: + repository: nymtech/wireguard-windows + ref: master + # have to set this to false because it fails to complete clean on windows self-hosted runner + # not sure how this will impact new build version changes + clean: false # Runs a set of commands using the runners shell - name: Run build and signing env: From be2ef826ac510c123f790dae17b7d044b2e42026 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Wed, 1 Nov 2023 14:25:58 -0400 Subject: [PATCH 36/89] Update wg-windows-build-publish-.yml --- .../workflows/wg-windows-build-publish-.yml | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index dad95ae..24b38fd 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -24,18 +24,23 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Add sign cert to file - - name: Create signing.pfx from B64_SECRET1 - id: secret-file1 - run: | - $FileName = "${{ github.workspace }}/signing.pfx" - if (Test-Path $FileName) { - Remove-Item $FileName - } - $data = [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($env:SECRET_DATA1)) - New-Item -Path ${{ github.workspace }} -name "signing.pfx" -Value $data - shell: pwsh - env: - SECRET_DATA1: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} + # - name: Create signing.pfx from B64_SECRET1 + # id: secret-file1 + # run: | + # $FileName = "${{ github.workspace }}/signing.pfx" + # if (Test-Path $FileName) { + # Remove-Item $FileName + # } + # $data = [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($env:SECRET_DATA1)) + # New-Item -Path ${{ github.workspace }} -name "signing.pfx" -Value $data + # shell: pwsh + # env: + # SECRET_DATA1: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} + - name: Create env file + uses: timheuer/base64-to-file@v1.2 + with: + fileName: 'signing.pfx' + encodedString: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} # This part here is cloning a second repository # While cloning the repository: # - it clones the repo into the given `path` From 497380d4363524efc82c07e2de84dced1314744f Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Wed, 1 Nov 2023 15:08:08 -0400 Subject: [PATCH 37/89] Update wg-windows-build-publish-.yml --- .../workflows/wg-windows-build-publish-.yml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml index 24b38fd..1b3b288 100644 --- a/.github/workflows/wg-windows-build-publish-.yml +++ b/.github/workflows/wg-windows-build-publish-.yml @@ -18,24 +18,10 @@ jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on - # remove windows11 tag for real runner - runs-on: [self-hosted, Windows, windows11, noroot] + runs-on: [windows-latest-8-core] # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Add sign cert to file - # - name: Create signing.pfx from B64_SECRET1 - # id: secret-file1 - # run: | - # $FileName = "${{ github.workspace }}/signing.pfx" - # if (Test-Path $FileName) { - # Remove-Item $FileName - # } - # $data = [System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($env:SECRET_DATA1)) - # New-Item -Path ${{ github.workspace }} -name "signing.pfx" -Value $data - # shell: pwsh - # env: - # SECRET_DATA1: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} - name: Create env file uses: timheuer/base64-to-file@v1.2 with: @@ -58,7 +44,7 @@ jobs: env: SigningCertificate: "signing.pfx" SigningCertificatePassword: ${{ secrets.WINDOWS_SIGNING_PFX_PASSWORD }} - # not sure if this timestamp server will work, pulled from tauri docs + # pulled from tauri docs TimestampServer: http://timestamp.comodoca.com run: | .\build.bat %TimestampServer% %SigningCertificate% %SigningCertificatePassword% From 19c47e5192972f61496024be30a9fb39b344fbe2 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Thu, 2 Nov 2023 20:14:04 -0400 Subject: [PATCH 38/89] Update and rename .github/workflows/wg-windows-build-publish-.yml to .github/macos-build-publish.yml --- .github/macos-build-publish.yml | 43 +++++++++++ .../workflows/wg-windows-build-publish-.yml | 73 ------------------- 2 files changed, 43 insertions(+), 73 deletions(-) create mode 100644 .github/macos-build-publish.yml delete mode 100644 .github/workflows/wg-windows-build-publish-.yml diff --git a/.github/macos-build-publish.yml b/.github/macos-build-publish.yml new file mode 100644 index 0000000..bce6eb9 --- /dev/null +++ b/.github/macos-build-publish.yml @@ -0,0 +1,43 @@ +name: "build-test" +on: # rebuild any PRs and main branch changes + pull_request: + push: + branches: + - master + +jobs: + build: # make sure build/ci work properly + runs-on: macOS-latest + timeout-minutes: 30 + steps: + - name: Clone wireguard-apple repo + uses: actions/checkout@v4 + with: + repository: nymtech/wireguard-apple + ref: master + # have to set this to false because it fails to complete clean on windows self-hosted runner + # not sure how this will impact new build version changes + clean: false + - uses: Apple-Actions/import-codesign-certs@v1 + with: + p12-file-base64: ${{ secrets.APPLE_SIGNING_CERT_BASE64 }} + p12-password: ${{ secrets.APPLE_SIGNING_CERT_PASSWORD }} + - uses: Apple-Actions/download-provisioning-profiles@v1 + with: + bundle-id: net.nymtech.wallet + issuer-id: ${{ secrets.APPLE_APPSTORE_ISSUER_ID }} + api-key-id: ${{ secrets.APPLE_APPSTORE_KEY_ID }} + api-private-key: ${{ secrets.APPLE_APPSTORE_PRIVATE_KEY }} + - name: "#️⃣ Generate Build Number" + id: buildnumber + uses: einaregilsson/build-number@v2 + #with: + #token: ${{ secrets.github_token }} + - run: ./Build + - uses: Apple-Actions/upload-testflight-build@master + with: + app-path: .build/Artifacts/Example-iOS.ipa/Example-iOS.ipa + issuer-id: ${{ secrets.APPLE_APPSTORE_ISSUER_ID }} + api-key-id: ${{ secrets.APPLE_APPSTORE_KEY_ID }} + api-private-key: ${{ secrets.APPLE_APPSTORE_PRIVATE_KEY }} + diff --git a/.github/workflows/wg-windows-build-publish-.yml b/.github/workflows/wg-windows-build-publish-.yml deleted file mode 100644 index 1b3b288..0000000 --- a/.github/workflows/wg-windows-build-publish-.yml +++ /dev/null @@ -1,73 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: CI - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the "main" branch - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: [windows-latest-8-core] - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - - name: Create env file - uses: timheuer/base64-to-file@v1.2 - with: - fileName: 'signing.pfx' - encodedString: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} - # This part here is cloning a second repository - # While cloning the repository: - # - it clones the repo into the given `path` - # - it checks out the branch defined at `ref` - - name: Clone wireguard-windows repo - uses: actions/checkout@v4 - with: - repository: nymtech/wireguard-windows - ref: master - # have to set this to false because it fails to complete clean on windows self-hosted runner - # not sure how this will impact new build version changes - clean: false - # Runs a set of commands using the runners shell - - name: Run build and signing - env: - SigningCertificate: "signing.pfx" - SigningCertificatePassword: ${{ secrets.WINDOWS_SIGNING_PFX_PASSWORD }} - # pulled from tauri docs - TimestampServer: http://timestamp.comodoca.com - run: | - .\build.bat %TimestampServer% %SigningCertificate% %SigningCertificatePassword% - .\installer\build.bat %TimestampServer% %SigningCertificate% %SigningCertificatePassword% - - # will need to update these in the future to be dynamic for release version - - name: wireguard-amd64 - uses: actions/upload-artifact@v3 - with: - name: wireguard-amd64-0.5.3.msi - path: installer\dist\wireguard-amd64-0.5.3.msi - retention-days: 1 - - - name: wireguard-arm64 - uses: actions/upload-artifact@v3 - with: - name: wireguard-arm64-0.5.3.msi - path: installer\dist\wireguard-arm64-0.5.3.msi - retention-days: 1 - - - name: wireguard-x86 - uses: actions/upload-artifact@v3 - with: - name: wireguard-x86-0.5.3.msi - path: installer\dist\wireguard-x86-0.5.3.msi - retention-days: 1 From f917e4800d07082cf2349cd4cd7a47f8e8522968 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Thu, 2 Nov 2023 20:16:26 -0400 Subject: [PATCH 39/89] Update macos-build-publish.yml --- .github/macos-build-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/macos-build-publish.yml b/.github/macos-build-publish.yml index bce6eb9..21449ec 100644 --- a/.github/macos-build-publish.yml +++ b/.github/macos-build-publish.yml @@ -7,7 +7,7 @@ on: # rebuild any PRs and main branch changes jobs: build: # make sure build/ci work properly - runs-on: macOS-latest + runs-on: [custom-runner-mac-m1] timeout-minutes: 30 steps: - name: Clone wireguard-apple repo From 11de6d112b72491655f310d846810beb5d902ddc Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Thu, 2 Nov 2023 20:20:11 -0400 Subject: [PATCH 40/89] Create macos-build-publish.yml --- .github/workflows/macos-build-publish.yml | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/macos-build-publish.yml diff --git a/.github/workflows/macos-build-publish.yml b/.github/workflows/macos-build-publish.yml new file mode 100644 index 0000000..f6cdb2f --- /dev/null +++ b/.github/workflows/macos-build-publish.yml @@ -0,0 +1,42 @@ +name: "build-test" +on: # rebuild any PRs and main branch changes + pull_request: + push: + branches: + - master + +jobs: + build: # make sure build/ci work properly + runs-on: [custom-runner-mac-m1] + timeout-minutes: 30 + steps: + - name: Clone wireguard-apple repo + uses: actions/checkout@v4 + with: + repository: nymtech/wireguard-apple + ref: master + # have to set this to false because it fails to complete clean on windows self-hosted runner + # not sure how this will impact new build version changes + clean: false + - uses: Apple-Actions/import-codesign-certs@v1 + with: + p12-file-base64: ${{ secrets.APPLE_SIGNING_CERT_BASE64 }} + p12-password: ${{ secrets.APPLE_SIGNING_CERT_PASSWORD }} + - uses: Apple-Actions/download-provisioning-profiles@v1 + with: + bundle-id: net.nymtech.wallet + issuer-id: ${{ secrets.APPLE_APPSTORE_ISSUER_ID }} + api-key-id: ${{ secrets.APPLE_APPSTORE_KEY_ID }} + api-private-key: ${{ secrets.APPLE_APPSTORE_PRIVATE_KEY }} + - name: "#️⃣ Generate Build Number" + id: buildnumber + uses: einaregilsson/build-number@v2 + #with: + #token: ${{ secrets.github_token }} + - run: ./Build + - uses: Apple-Actions/upload-testflight-build@master + with: + app-path: .build/Artifacts/Example-iOS.ipa/Example-iOS.ipa + issuer-id: ${{ secrets.APPLE_APPSTORE_ISSUER_ID }} + api-key-id: ${{ secrets.APPLE_APPSTORE_KEY_ID }} + api-private-key: ${{ secrets.APPLE_APPSTORE_PRIVATE_KEY }} From 1cf6cc56396e157330bc8cf782c555e6ea634ce8 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Thu, 2 Nov 2023 20:21:46 -0400 Subject: [PATCH 41/89] Update macos-build-publish.yml --- .github/workflows/macos-build-publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/macos-build-publish.yml b/.github/workflows/macos-build-publish.yml index f6cdb2f..4b45fe8 100644 --- a/.github/workflows/macos-build-publish.yml +++ b/.github/workflows/macos-build-publish.yml @@ -5,6 +5,9 @@ on: # rebuild any PRs and main branch changes branches: - master + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + jobs: build: # make sure build/ci work properly runs-on: [custom-runner-mac-m1] From 1de28af8fb9b4ea06c8c7a173ee9ff2cdd645ea3 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Thu, 2 Nov 2023 20:27:24 -0400 Subject: [PATCH 42/89] Update macos-build-publish.yml --- .github/macos-build-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/macos-build-publish.yml b/.github/macos-build-publish.yml index 21449ec..e7ca35d 100644 --- a/.github/macos-build-publish.yml +++ b/.github/macos-build-publish.yml @@ -3,7 +3,7 @@ on: # rebuild any PRs and main branch changes pull_request: push: branches: - - master + - main jobs: build: # make sure build/ci work properly @@ -24,7 +24,7 @@ jobs: p12-password: ${{ secrets.APPLE_SIGNING_CERT_PASSWORD }} - uses: Apple-Actions/download-provisioning-profiles@v1 with: - bundle-id: net.nymtech.wallet + bundle-id: net.nymtech.vpn issuer-id: ${{ secrets.APPLE_APPSTORE_ISSUER_ID }} api-key-id: ${{ secrets.APPLE_APPSTORE_KEY_ID }} api-private-key: ${{ secrets.APPLE_APPSTORE_PRIVATE_KEY }} From df17cb98ee7f2142852781c1d95b2dc80ca55a23 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Thu, 2 Nov 2023 20:39:26 -0400 Subject: [PATCH 43/89] Update macos-build-publish.yml --- .github/workflows/macos-build-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos-build-publish.yml b/.github/workflows/macos-build-publish.yml index 4b45fe8..f071c66 100644 --- a/.github/workflows/macos-build-publish.yml +++ b/.github/workflows/macos-build-publish.yml @@ -10,7 +10,7 @@ on: # rebuild any PRs and main branch changes jobs: build: # make sure build/ci work properly - runs-on: [custom-runner-mac-m1] + runs-on: [macOS, macbook] timeout-minutes: 30 steps: - name: Clone wireguard-apple repo From 7aa74aa3a65aaa72037dbc909c39e862a3b5635c Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 10 Nov 2023 07:20:12 -0500 Subject: [PATCH 44/89] Add tauri-build-publish.yml Test CI for tauri windows --- .github/workflows/macos-build-publish.yml | 45 ------------------- .github/workflows/tauri-build-publish.yml | 55 +++++++++++++++++++++++ 2 files changed, 55 insertions(+), 45 deletions(-) delete mode 100644 .github/workflows/macos-build-publish.yml create mode 100644 .github/workflows/tauri-build-publish.yml diff --git a/.github/workflows/macos-build-publish.yml b/.github/workflows/macos-build-publish.yml deleted file mode 100644 index f071c66..0000000 --- a/.github/workflows/macos-build-publish.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: "build-test" -on: # rebuild any PRs and main branch changes - pull_request: - push: - branches: - - master - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - build: # make sure build/ci work properly - runs-on: [macOS, macbook] - timeout-minutes: 30 - steps: - - name: Clone wireguard-apple repo - uses: actions/checkout@v4 - with: - repository: nymtech/wireguard-apple - ref: master - # have to set this to false because it fails to complete clean on windows self-hosted runner - # not sure how this will impact new build version changes - clean: false - - uses: Apple-Actions/import-codesign-certs@v1 - with: - p12-file-base64: ${{ secrets.APPLE_SIGNING_CERT_BASE64 }} - p12-password: ${{ secrets.APPLE_SIGNING_CERT_PASSWORD }} - - uses: Apple-Actions/download-provisioning-profiles@v1 - with: - bundle-id: net.nymtech.wallet - issuer-id: ${{ secrets.APPLE_APPSTORE_ISSUER_ID }} - api-key-id: ${{ secrets.APPLE_APPSTORE_KEY_ID }} - api-private-key: ${{ secrets.APPLE_APPSTORE_PRIVATE_KEY }} - - name: "#️⃣ Generate Build Number" - id: buildnumber - uses: einaregilsson/build-number@v2 - #with: - #token: ${{ secrets.github_token }} - - run: ./Build - - uses: Apple-Actions/upload-testflight-build@master - with: - app-path: .build/Artifacts/Example-iOS.ipa/Example-iOS.ipa - issuer-id: ${{ secrets.APPLE_APPSTORE_ISSUER_ID }} - api-key-id: ${{ secrets.APPLE_APPSTORE_KEY_ID }} - api-private-key: ${{ secrets.APPLE_APPSTORE_PRIVATE_KEY }} diff --git a/.github/workflows/tauri-build-publish.yml b/.github/workflows/tauri-build-publish.yml new file mode 100644 index 0000000..3e72537 --- /dev/null +++ b/.github/workflows/tauri-build-publish.yml @@ -0,0 +1,55 @@ +name: 'publish' +on: + push: + branches: + - main + +jobs: + publish-tauri: + strategy: + fail-fast: false + matrix: + platform: [windows-latest] + + runs-on: ${{ matrix.platform }} + steps: + - name: Checkout tools repo + uses: actions/checkout@v4 + with: + repository: nymtech/nym + path: nym/nym-vpn/ui + - name: setup node + uses: actions/setup-node@v1 + with: + node-version: 12 + - name: install Rust stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + # - name: install webkit2gtk (ubuntu only) + # if: matrix.platform == 'ubuntu-latest' + # run: | + # sudo apt-get update + # sudo apt-get install -y webkit2gtk-4.0 + - name: import windows certificate + if: matrix.platform == 'windows-latest' + env: + WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} + WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_SIGNING_PFX_PASSWORD }} + run: | + New-Item -ItemType directory -Path certificate + Set-Content -Path certificate/tempCert.txt -Value $env:WINDOWS_CERTIFICATE + certutil -decode certificate/tempCert.txt certificate/certificate.pfx + Remove-Item -path certificate -include tempCert.txt + Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText) + - name: install app dependencies and build it + run: yarn && yarn build + - uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version + releaseName: 'App v__VERSION__' + releaseBody: 'See the assets to download this version and install.' + releaseDraft: true + prerelease: false From adfa75d6b271cd9b74dc977caa2b1ebe29217978 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 10 Nov 2023 07:27:47 -0500 Subject: [PATCH 45/89] Update tauri-build-publish.yml --- .github/workflows/tauri-build-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tauri-build-publish.yml b/.github/workflows/tauri-build-publish.yml index 3e72537..1d4cc74 100644 --- a/.github/workflows/tauri-build-publish.yml +++ b/.github/workflows/tauri-build-publish.yml @@ -43,7 +43,7 @@ jobs: Remove-Item -path certificate -include tempCert.txt Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText) - name: install app dependencies and build it - run: yarn && yarn build + run: cd nym/nym-vpn/ui && yarn && yarn build - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 9f5e75bf15e9eadb701bbd81faff0e91e78fd7df Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 10 Nov 2023 08:12:15 -0500 Subject: [PATCH 46/89] Update tauri-build-publish.yml --- .github/workflows/tauri-build-publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tauri-build-publish.yml b/.github/workflows/tauri-build-publish.yml index 1d4cc74..3022231 100644 --- a/.github/workflows/tauri-build-publish.yml +++ b/.github/workflows/tauri-build-publish.yml @@ -18,10 +18,11 @@ jobs: with: repository: nymtech/nym path: nym/nym-vpn/ui + ref: feature/tauri-windows-service - name: setup node uses: actions/setup-node@v1 with: - node-version: 12 + node-version: 16 - name: install Rust stable uses: actions-rs/toolchain@v1 with: From 353ff8a6a5297615297b3253554331d31fda1c30 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 10 Nov 2023 08:18:46 -0500 Subject: [PATCH 47/89] Update tauri-build-publish.yml --- .github/workflows/tauri-build-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tauri-build-publish.yml b/.github/workflows/tauri-build-publish.yml index 3022231..46b6130 100644 --- a/.github/workflows/tauri-build-publish.yml +++ b/.github/workflows/tauri-build-publish.yml @@ -44,7 +44,7 @@ jobs: Remove-Item -path certificate -include tempCert.txt Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText) - name: install app dependencies and build it - run: cd nym/nym-vpn/ui && yarn && yarn build + run: cd nym/nym-vpn/ui && npm i && yarn build - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 08a72a414f0c9f9c1492ee3b5ffba171ed212610 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 10 Nov 2023 08:28:09 -0500 Subject: [PATCH 48/89] Update tauri-build-publish.yml --- .github/workflows/tauri-build-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tauri-build-publish.yml b/.github/workflows/tauri-build-publish.yml index 46b6130..0e0e973 100644 --- a/.github/workflows/tauri-build-publish.yml +++ b/.github/workflows/tauri-build-publish.yml @@ -22,7 +22,7 @@ jobs: - name: setup node uses: actions/setup-node@v1 with: - node-version: 16 + node-version: 21 - name: install Rust stable uses: actions-rs/toolchain@v1 with: @@ -44,7 +44,7 @@ jobs: Remove-Item -path certificate -include tempCert.txt Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText) - name: install app dependencies and build it - run: cd nym/nym-vpn/ui && npm i && yarn build + run: cd nym/nym-vpn/ui && yarn && yarn build - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 7b1d65bae26677f9160e6d06c962727949007bd4 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 10 Nov 2023 08:33:43 -0500 Subject: [PATCH 49/89] Update tauri-build-publish.yml --- .github/workflows/tauri-build-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tauri-build-publish.yml b/.github/workflows/tauri-build-publish.yml index 0e0e973..1febf70 100644 --- a/.github/workflows/tauri-build-publish.yml +++ b/.github/workflows/tauri-build-publish.yml @@ -44,7 +44,7 @@ jobs: Remove-Item -path certificate -include tempCert.txt Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText) - name: install app dependencies and build it - run: cd nym/nym-vpn/ui && yarn && yarn build + run: cd nym/nym-vpn/ui && yarn install - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 7f0c692a601d1fc29f3b2ea19d90f7d0f9a0a82c Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 10 Nov 2023 08:50:44 -0500 Subject: [PATCH 50/89] Update tauri-build-publish.yml --- .github/workflows/tauri-build-publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tauri-build-publish.yml b/.github/workflows/tauri-build-publish.yml index 1febf70..8c15650 100644 --- a/.github/workflows/tauri-build-publish.yml +++ b/.github/workflows/tauri-build-publish.yml @@ -54,3 +54,4 @@ jobs: releaseBody: 'See the assets to download this version and install.' releaseDraft: true prerelease: false + projectPath: nym/nyp-vpn/ui From 226f7045976a184ca4c73cdc50f3aac4b61c720d Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 10 Nov 2023 09:11:43 -0500 Subject: [PATCH 51/89] Update tauri-build-publish.yml --- .github/workflows/tauri-build-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tauri-build-publish.yml b/.github/workflows/tauri-build-publish.yml index 8c15650..21891ab 100644 --- a/.github/workflows/tauri-build-publish.yml +++ b/.github/workflows/tauri-build-publish.yml @@ -44,7 +44,7 @@ jobs: Remove-Item -path certificate -include tempCert.txt Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText) - name: install app dependencies and build it - run: cd nym/nym-vpn/ui && yarn install + run: cd nym/nym-vpn/ui && npm i - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ab02f39b458656a0eafbfdc3ba3bfa1cc6e795c8 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 10 Nov 2023 09:31:27 -0500 Subject: [PATCH 52/89] Update tauri-build-publish.yml --- .github/workflows/tauri-build-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tauri-build-publish.yml b/.github/workflows/tauri-build-publish.yml index 21891ab..49987fb 100644 --- a/.github/workflows/tauri-build-publish.yml +++ b/.github/workflows/tauri-build-publish.yml @@ -44,7 +44,7 @@ jobs: Remove-Item -path certificate -include tempCert.txt Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText) - name: install app dependencies and build it - run: cd nym/nym-vpn/ui && npm i + run: cd nym/nym-vpn/ui && yarn - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 30e8453d2a46a053e8474c368bffa8ddbb077bc5 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 10 Nov 2023 16:43:45 -0500 Subject: [PATCH 53/89] Update tauri-build-publish.yml --- .github/workflows/tauri-build-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tauri-build-publish.yml b/.github/workflows/tauri-build-publish.yml index 49987fb..0f07584 100644 --- a/.github/workflows/tauri-build-publish.yml +++ b/.github/workflows/tauri-build-publish.yml @@ -44,7 +44,7 @@ jobs: Remove-Item -path certificate -include tempCert.txt Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText) - name: install app dependencies and build it - run: cd nym/nym-vpn/ui && yarn + run: cd nym/nym-vpn/ui && yarn install --network-timeout 1000000 - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From be1c869ee8c2bfc456265071f99a5a9ee6eab86d Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 10 Nov 2023 18:15:03 -0500 Subject: [PATCH 54/89] Update tauri-build-publish.yml --- .github/workflows/tauri-build-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tauri-build-publish.yml b/.github/workflows/tauri-build-publish.yml index 0f07584..c090179 100644 --- a/.github/workflows/tauri-build-publish.yml +++ b/.github/workflows/tauri-build-publish.yml @@ -54,4 +54,4 @@ jobs: releaseBody: 'See the assets to download this version and install.' releaseDraft: true prerelease: false - projectPath: nym/nyp-vpn/ui + projectPath: nyp-vpn/ui From f3e0ab1f02dbbcc8fce7eddec53590a1a7efe623 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Sun, 12 Nov 2023 10:24:03 -0500 Subject: [PATCH 55/89] Update tauri-build-publish.yml --- .github/workflows/tauri-build-publish.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tauri-build-publish.yml b/.github/workflows/tauri-build-publish.yml index c090179..3350d85 100644 --- a/.github/workflows/tauri-build-publish.yml +++ b/.github/workflows/tauri-build-publish.yml @@ -10,6 +10,8 @@ jobs: fail-fast: false matrix: platform: [windows-latest] + env: + working-directory: ./nym/nym-vpn/ui runs-on: ${{ matrix.platform }} steps: @@ -44,7 +46,8 @@ jobs: Remove-Item -path certificate -include tempCert.txt Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText) - name: install app dependencies and build it - run: cd nym/nym-vpn/ui && yarn install --network-timeout 1000000 + run: yarn install --network-timeout 1000000 && yarn build + working-directory: ${{env.working-directory}} - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -54,4 +57,4 @@ jobs: releaseBody: 'See the assets to download this version and install.' releaseDraft: true prerelease: false - projectPath: nyp-vpn/ui + projectPath: ${{ env.working-directory }} From 7db1b7cd4a03e9dddee566155fdab79723fdc638 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Mon, 13 Nov 2023 03:48:31 -0500 Subject: [PATCH 56/89] Update tauri-build-publish.yml --- .github/workflows/tauri-build-publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tauri-build-publish.yml b/.github/workflows/tauri-build-publish.yml index 3350d85..e00b615 100644 --- a/.github/workflows/tauri-build-publish.yml +++ b/.github/workflows/tauri-build-publish.yml @@ -51,6 +51,8 @@ jobs: - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAURI_PRIVATE_KEY: ${{ TAURI_PRIVATE_KEY }} + TAURI_KEY_PASSWORD: ${{ TAURI_KEY_PASSWORD }} with: tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version releaseName: 'App v__VERSION__' From 7d4ba2f7b088e2e3f81d0dcaecb8646fe14c5d06 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Mon, 13 Nov 2023 03:48:49 -0500 Subject: [PATCH 57/89] Update tauri-build-publish.yml --- .github/workflows/tauri-build-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tauri-build-publish.yml b/.github/workflows/tauri-build-publish.yml index e00b615..b01bfb2 100644 --- a/.github/workflows/tauri-build-publish.yml +++ b/.github/workflows/tauri-build-publish.yml @@ -51,8 +51,8 @@ jobs: - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAURI_PRIVATE_KEY: ${{ TAURI_PRIVATE_KEY }} - TAURI_KEY_PASSWORD: ${{ TAURI_KEY_PASSWORD }} + TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} + TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} with: tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version releaseName: 'App v__VERSION__' From c2389027134d314b49e966b7416e5368db663001 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Thu, 16 Nov 2023 22:34:47 -0500 Subject: [PATCH 58/89] Update desktop pipeline --- .github/macos-build-publish.yml | 43 ----------- .github/workflows/nymvpn-desktop.yml | 102 +++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 43 deletions(-) delete mode 100644 .github/macos-build-publish.yml create mode 100644 .github/workflows/nymvpn-desktop.yml diff --git a/.github/macos-build-publish.yml b/.github/macos-build-publish.yml deleted file mode 100644 index e7ca35d..0000000 --- a/.github/macos-build-publish.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: "build-test" -on: # rebuild any PRs and main branch changes - pull_request: - push: - branches: - - main - -jobs: - build: # make sure build/ci work properly - runs-on: [custom-runner-mac-m1] - timeout-minutes: 30 - steps: - - name: Clone wireguard-apple repo - uses: actions/checkout@v4 - with: - repository: nymtech/wireguard-apple - ref: master - # have to set this to false because it fails to complete clean on windows self-hosted runner - # not sure how this will impact new build version changes - clean: false - - uses: Apple-Actions/import-codesign-certs@v1 - with: - p12-file-base64: ${{ secrets.APPLE_SIGNING_CERT_BASE64 }} - p12-password: ${{ secrets.APPLE_SIGNING_CERT_PASSWORD }} - - uses: Apple-Actions/download-provisioning-profiles@v1 - with: - bundle-id: net.nymtech.vpn - issuer-id: ${{ secrets.APPLE_APPSTORE_ISSUER_ID }} - api-key-id: ${{ secrets.APPLE_APPSTORE_KEY_ID }} - api-private-key: ${{ secrets.APPLE_APPSTORE_PRIVATE_KEY }} - - name: "#️⃣ Generate Build Number" - id: buildnumber - uses: einaregilsson/build-number@v2 - #with: - #token: ${{ secrets.github_token }} - - run: ./Build - - uses: Apple-Actions/upload-testflight-build@master - with: - app-path: .build/Artifacts/Example-iOS.ipa/Example-iOS.ipa - issuer-id: ${{ secrets.APPLE_APPSTORE_ISSUER_ID }} - api-key-id: ${{ secrets.APPLE_APPSTORE_KEY_ID }} - api-private-key: ${{ secrets.APPLE_APPSTORE_PRIVATE_KEY }} - diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml new file mode 100644 index 0000000..07f4bea --- /dev/null +++ b/.github/workflows/nymvpn-desktop.yml @@ -0,0 +1,102 @@ +name: 'publish' +on: + push: + branches: + - main + +jobs: + publish-tauri: + strategy: + fail-fast: false + matrix: + platform: [windows-latest, macos-latest, ubuntu-latest] + env: + working-directory: ./nym/nym-vpn/desktop + runs-on: ${{ matrix.platform }} + steps: + - name: Checkout tools repo + uses: actions/checkout@v4 + with: + repository: nymtech/nym + path: nym/nym-vpn/desktop + ref: feature/nymvpn-desktop + - name: setup node + uses: actions/setup-node@v1 + with: + node-version: 21 + - name: install Rust stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: install cargo dependencies + run: | + cargo install cargo-deb + cargo install cargo-generate-rpm + cargo install --force cargo-make + cargo install sd + cargo install ripgrep + cargo install cargo-about + - name: install ubuntu dependencies + if: matrix.platform == 'ubuntu-latest' + run: | + apt install build-essential \ + pkg-config \ + libgtk-3-dev \ + libssl-dev \ + libsoup2.4-dev \ + libjavascriptcoregtk-4.0-dev \ + libwebkit2gtk-4.0-dev \ + libmnl-dev \ + libnftnl-dev \ + protobuf-compiler \ + zip \ + - name: install protobuf macos + if: matrix.platform == 'macos-latest' + run: | + brew install protobuf + - name: install protobuf windows + if: matrix.platform == 'windows-latest' + uses: crazy-max/ghaction-chocolatey@v3 + with: + args: install protoc + - name: build ubuntu deb package + if: matrix.platform == 'ubuntu-latest' + run: | + cargo make deb + - name: inport apple certs + if: matrix.platform == 'macos-latest' + uses: apple-actions/import-codesign-certs@v2 + with: + p12-file-base64: ${{ secrets.APPLE_SIGNING_CERT_BASE64 }} + p12-password: ${{ secrets.APPLE_SIGNING_CERT_PASSWORD }} + - uses: Apple-Actions/download-provisioning-profiles@v1 + with: + bundle-id: net.nymtech.vpn + issuer-id: ${{ secrets.APPLE_APPSTORE_ISSUER_ID }} + api-key-id: ${{ secrets.APPLE_APPSTORE_KEY_ID }} + api-private-key: ${{ secrets.APPLE_APPSTORE_PRIVATE_KEY }} + - name: build macos pkg + if: matrix.platform == 'macos-latest' + run: | + cargo make pkg + env: + APPLE_TEAM_ID: VW5DZLFHM5 + APPLICATION_SIGNING_IDENTITY: Nym Technologies SA + INSTALLER_SIGNING_IDENTITY: Nym Technologies SA + - name: Create env file + uses: timheuer/base64-to-file@v1.2 + if: matrix.platform == 'windows-latest' + with: + fileName: 'signing.pfx' + encodedString: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} + - name: build macos pkg + if: matrix.platform == 'windows-latest' + run: | + cargo make msi + env: + SIGN: true + CERT_FILE: "signing.pfx" + CERT_FILE_PASSWORD: ${{ secrets.WINDOWS_SIGNING_PFX_PASSWORD }} + + + \ No newline at end of file From c6d9c2472734fad42c8e978d04f073c4b83694fe Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Thu, 16 Nov 2023 22:55:50 -0500 Subject: [PATCH 59/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index 07f4bea..4173605 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -39,7 +39,7 @@ jobs: - name: install ubuntu dependencies if: matrix.platform == 'ubuntu-latest' run: | - apt install build-essential \ + apt-update install build-essential \ pkg-config \ libgtk-3-dev \ libssl-dev \ @@ -70,6 +70,7 @@ jobs: p12-file-base64: ${{ secrets.APPLE_SIGNING_CERT_BASE64 }} p12-password: ${{ secrets.APPLE_SIGNING_CERT_PASSWORD }} - uses: Apple-Actions/download-provisioning-profiles@v1 + if: matrix.platform == 'macos-latest' with: bundle-id: net.nymtech.vpn issuer-id: ${{ secrets.APPLE_APPSTORE_ISSUER_ID }} From 7286265980b55c7243ad8b018114e8188f807af2 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Thu, 16 Nov 2023 22:56:47 -0500 Subject: [PATCH 60/89] Update tauri-build-publish.yml --- .github/workflows/tauri-build-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tauri-build-publish.yml b/.github/workflows/tauri-build-publish.yml index b01bfb2..82fe373 100644 --- a/.github/workflows/tauri-build-publish.yml +++ b/.github/workflows/tauri-build-publish.yml @@ -2,7 +2,7 @@ name: 'publish' on: push: branches: - - main + - develop jobs: publish-tauri: From 1b09438582dc5a730f34ec5a60cb567bda3606bc Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Thu, 16 Nov 2023 23:32:49 -0500 Subject: [PATCH 61/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index 4173605..41714c4 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -27,7 +27,7 @@ jobs: - name: install Rust stable uses: actions-rs/toolchain@v1 with: - toolchain: stable + toolchain: nightly - name: install cargo dependencies run: | cargo install cargo-deb @@ -39,7 +39,7 @@ jobs: - name: install ubuntu dependencies if: matrix.platform == 'ubuntu-latest' run: | - apt-update install build-essential \ + sudo apt install -y build-essential \ pkg-config \ libgtk-3-dev \ libssl-dev \ @@ -90,7 +90,7 @@ jobs: with: fileName: 'signing.pfx' encodedString: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} - - name: build macos pkg + - name: build windows installer if: matrix.platform == 'windows-latest' run: | cargo make msi From d0697bf641644ff79e5f7ce102a2344f2a715359 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 17 Nov 2023 00:01:08 -0500 Subject: [PATCH 62/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index 41714c4..cb9a004 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -27,7 +27,7 @@ jobs: - name: install Rust stable uses: actions-rs/toolchain@v1 with: - toolchain: nightly + toolchain: stable - name: install cargo dependencies run: | cargo install cargo-deb @@ -61,8 +61,9 @@ jobs: args: install protoc - name: build ubuntu deb package if: matrix.platform == 'ubuntu-latest' - run: | - cargo make deb + uses: actions-rs/cargo@v1 + with: + command: make deb - name: inport apple certs if: matrix.platform == 'macos-latest' uses: apple-actions/import-codesign-certs@v2 @@ -78,8 +79,9 @@ jobs: api-private-key: ${{ secrets.APPLE_APPSTORE_PRIVATE_KEY }} - name: build macos pkg if: matrix.platform == 'macos-latest' - run: | - cargo make pkg + uses: actions-rs/cargo@v1 + with: + command: make pkg env: APPLE_TEAM_ID: VW5DZLFHM5 APPLICATION_SIGNING_IDENTITY: Nym Technologies SA @@ -92,8 +94,9 @@ jobs: encodedString: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} - name: build windows installer if: matrix.platform == 'windows-latest' - run: | - cargo make msi + uses: actions-rs/cargo@v1 + with: + command: make msi env: SIGN: true CERT_FILE: "signing.pfx" From 7465300d654e383606b3ee0d829181a88d81d422 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 17 Nov 2023 00:23:25 -0500 Subject: [PATCH 63/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index cb9a004..c422a09 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -13,6 +13,9 @@ jobs: env: working-directory: ./nym/nym-vpn/desktop runs-on: ${{ matrix.platform }} + defaults: + run: + working-directory: ./nym/nym-vpn/desktop steps: - name: Checkout tools repo uses: actions/checkout@v4 @@ -61,9 +64,7 @@ jobs: args: install protoc - name: build ubuntu deb package if: matrix.platform == 'ubuntu-latest' - uses: actions-rs/cargo@v1 - with: - command: make deb + run: cargo make deb - name: inport apple certs if: matrix.platform == 'macos-latest' uses: apple-actions/import-codesign-certs@v2 @@ -79,9 +80,7 @@ jobs: api-private-key: ${{ secrets.APPLE_APPSTORE_PRIVATE_KEY }} - name: build macos pkg if: matrix.platform == 'macos-latest' - uses: actions-rs/cargo@v1 - with: - command: make pkg + run: cargo make pkg env: APPLE_TEAM_ID: VW5DZLFHM5 APPLICATION_SIGNING_IDENTITY: Nym Technologies SA @@ -94,9 +93,7 @@ jobs: encodedString: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} - name: build windows installer if: matrix.platform == 'windows-latest' - uses: actions-rs/cargo@v1 - with: - command: make msi + run: cargo make msi env: SIGN: true CERT_FILE: "signing.pfx" From e96842985659d6641fcaf5a2ff06be89c16721b9 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 17 Nov 2023 05:33:57 -0500 Subject: [PATCH 64/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index c422a09..657ee82 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -62,6 +62,10 @@ jobs: uses: crazy-max/ghaction-chocolatey@v3 with: args: install protoc + - name: setup go + uses: actions/setup-go@v4 + with: + go-version: 'stable' - name: build ubuntu deb package if: matrix.platform == 'ubuntu-latest' run: cargo make deb From 5ad57cd7ac468538acddeed4eac315436d3dbeac Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 17 Nov 2023 06:10:12 -0500 Subject: [PATCH 65/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index 657ee82..3f68b98 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -21,7 +21,6 @@ jobs: uses: actions/checkout@v4 with: repository: nymtech/nym - path: nym/nym-vpn/desktop ref: feature/nymvpn-desktop - name: setup node uses: actions/setup-node@v1 From 81a32a79c50a348f31a929a96d10b7425fdd12a9 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 17 Nov 2023 06:36:23 -0500 Subject: [PATCH 66/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index 3f68b98..0ec9bd1 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -15,7 +15,7 @@ jobs: runs-on: ${{ matrix.platform }} defaults: run: - working-directory: ./nym/nym-vpn/desktop + working-directory: nym/nym-vpn/desktop steps: - name: Checkout tools repo uses: actions/checkout@v4 From 4ed299b36c2842d840823dca337f6e5a5fc7fb49 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 17 Nov 2023 06:45:00 -0500 Subject: [PATCH 67/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index 0ec9bd1..6f71ffb 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -10,17 +10,15 @@ jobs: fail-fast: false matrix: platform: [windows-latest, macos-latest, ubuntu-latest] + runs-on: ${{ matrix.platform }} env: working-directory: ./nym/nym-vpn/desktop - runs-on: ${{ matrix.platform }} - defaults: - run: - working-directory: nym/nym-vpn/desktop steps: - name: Checkout tools repo uses: actions/checkout@v4 with: repository: nymtech/nym + path: nym/nym-vpn/desktop ref: feature/nymvpn-desktop - name: setup node uses: actions/setup-node@v1 @@ -38,6 +36,7 @@ jobs: cargo install sd cargo install ripgrep cargo install cargo-about + working-directory: ${{env.working-directory}} - name: install ubuntu dependencies if: matrix.platform == 'ubuntu-latest' run: | @@ -68,6 +67,7 @@ jobs: - name: build ubuntu deb package if: matrix.platform == 'ubuntu-latest' run: cargo make deb + working-directory: ${{env.working-directory}} - name: inport apple certs if: matrix.platform == 'macos-latest' uses: apple-actions/import-codesign-certs@v2 @@ -84,6 +84,7 @@ jobs: - name: build macos pkg if: matrix.platform == 'macos-latest' run: cargo make pkg + working-directory: ${{env.working-directory}} env: APPLE_TEAM_ID: VW5DZLFHM5 APPLICATION_SIGNING_IDENTITY: Nym Technologies SA @@ -97,6 +98,7 @@ jobs: - name: build windows installer if: matrix.platform == 'windows-latest' run: cargo make msi + working-directory: ${{env.working-directory}} env: SIGN: true CERT_FILE: "signing.pfx" From 9f4ca7d281bb5a3c27ba9805e039b7556597e4a7 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 17 Nov 2023 06:57:10 -0500 Subject: [PATCH 68/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index 6f71ffb..e3d6bb9 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -27,7 +27,7 @@ jobs: - name: install Rust stable uses: actions-rs/toolchain@v1 with: - toolchain: stable + toolchain: 1.73 - name: install cargo dependencies run: | cargo install cargo-deb From 1261ae187ea0330998e2a90124e563907cf3b7b5 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 17 Nov 2023 07:15:22 -0500 Subject: [PATCH 69/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index e3d6bb9..73ba9c6 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -38,7 +38,7 @@ jobs: cargo install cargo-about working-directory: ${{env.working-directory}} - name: install ubuntu dependencies - if: matrix.platform == 'ubuntu-latest' + if: matrix.platform == 'ubuntu-latest' && always() run: | sudo apt install -y build-essential \ pkg-config \ @@ -52,11 +52,11 @@ jobs: protobuf-compiler \ zip \ - name: install protobuf macos - if: matrix.platform == 'macos-latest' + if: matrix.platform == 'macos-latest' && always() run: | brew install protobuf - name: install protobuf windows - if: matrix.platform == 'windows-latest' + if: matrix.platform == 'windows-latest' && always() uses: crazy-max/ghaction-chocolatey@v3 with: args: install protoc From c765244ac855f54ad0669724f492f984f1da44c3 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 17 Nov 2023 07:27:12 -0500 Subject: [PATCH 70/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index 73ba9c6..bab49e0 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -29,6 +29,7 @@ jobs: with: toolchain: 1.73 - name: install cargo dependencies + continue-on-error: true run: | cargo install cargo-deb cargo install cargo-generate-rpm @@ -38,7 +39,7 @@ jobs: cargo install cargo-about working-directory: ${{env.working-directory}} - name: install ubuntu dependencies - if: matrix.platform == 'ubuntu-latest' && always() + if: matrix.platform == 'ubuntu-latest' run: | sudo apt install -y build-essential \ pkg-config \ @@ -52,11 +53,11 @@ jobs: protobuf-compiler \ zip \ - name: install protobuf macos - if: matrix.platform == 'macos-latest' && always() + if: matrix.platform == 'macos-latest' run: | brew install protobuf - name: install protobuf windows - if: matrix.platform == 'windows-latest' && always() + if: matrix.platform == 'windows-latest' uses: crazy-max/ghaction-chocolatey@v3 with: args: install protoc From 14a3c7f45f7b82ab51b973a1f372a0140451f0b2 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Fri, 17 Nov 2023 10:29:18 -0500 Subject: [PATCH 71/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index bab49e0..3f24979 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -76,6 +76,7 @@ jobs: p12-file-base64: ${{ secrets.APPLE_SIGNING_CERT_BASE64 }} p12-password: ${{ secrets.APPLE_SIGNING_CERT_PASSWORD }} - uses: Apple-Actions/download-provisioning-profiles@v1 + continue-on-error: true if: matrix.platform == 'macos-latest' with: bundle-id: net.nymtech.vpn From 8901f64c0147c0f55c18ef23020e4b38ae3c4855 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Sun, 19 Nov 2023 23:58:34 -0500 Subject: [PATCH 72/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index 3f24979..bb1a770 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -3,6 +3,9 @@ on: push: branches: - main +defaults: + run: + working-directory: ./nym-vpn/desktop jobs: publish-tauri: @@ -11,8 +14,6 @@ jobs: matrix: platform: [windows-latest, macos-latest, ubuntu-latest] runs-on: ${{ matrix.platform }} - env: - working-directory: ./nym/nym-vpn/desktop steps: - name: Checkout tools repo uses: actions/checkout@v4 @@ -37,7 +38,6 @@ jobs: cargo install sd cargo install ripgrep cargo install cargo-about - working-directory: ${{env.working-directory}} - name: install ubuntu dependencies if: matrix.platform == 'ubuntu-latest' run: | @@ -68,7 +68,6 @@ jobs: - name: build ubuntu deb package if: matrix.platform == 'ubuntu-latest' run: cargo make deb - working-directory: ${{env.working-directory}} - name: inport apple certs if: matrix.platform == 'macos-latest' uses: apple-actions/import-codesign-certs@v2 @@ -86,7 +85,6 @@ jobs: - name: build macos pkg if: matrix.platform == 'macos-latest' run: cargo make pkg - working-directory: ${{env.working-directory}} env: APPLE_TEAM_ID: VW5DZLFHM5 APPLICATION_SIGNING_IDENTITY: Nym Technologies SA @@ -100,11 +98,10 @@ jobs: - name: build windows installer if: matrix.platform == 'windows-latest' run: cargo make msi - working-directory: ${{env.working-directory}} env: SIGN: true CERT_FILE: "signing.pfx" CERT_FILE_PASSWORD: ${{ secrets.WINDOWS_SIGNING_PFX_PASSWORD }} - \ No newline at end of file + From 16f9addc759714cb7c42bc0edcbf92acfc395b18 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Sun, 19 Nov 2023 23:59:57 -0500 Subject: [PATCH 73/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index bb1a770..19cf661 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -5,7 +5,7 @@ on: - main defaults: run: - working-directory: ./nym-vpn/desktop + working-directory: nym/nym-vpn/desktop jobs: publish-tauri: From c257832bf9733592077456c320aee7fd12e1fcd4 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Mon, 20 Nov 2023 00:14:30 -0500 Subject: [PATCH 74/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index 19cf661..d11bb6d 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -3,9 +3,6 @@ on: push: branches: - main -defaults: - run: - working-directory: nym/nym-vpn/desktop jobs: publish-tauri: @@ -14,6 +11,8 @@ jobs: matrix: platform: [windows-latest, macos-latest, ubuntu-latest] runs-on: ${{ matrix.platform }} + env: + working-directory: ./nym/nym-vpn/desktop steps: - name: Checkout tools repo uses: actions/checkout@v4 @@ -67,6 +66,7 @@ jobs: go-version: 'stable' - name: build ubuntu deb package if: matrix.platform == 'ubuntu-latest' + working-directory: ${{ env.working-directory }} run: cargo make deb - name: inport apple certs if: matrix.platform == 'macos-latest' @@ -84,6 +84,7 @@ jobs: api-private-key: ${{ secrets.APPLE_APPSTORE_PRIVATE_KEY }} - name: build macos pkg if: matrix.platform == 'macos-latest' + working-directory: ${{ env.working-directory }} run: cargo make pkg env: APPLE_TEAM_ID: VW5DZLFHM5 @@ -97,6 +98,7 @@ jobs: encodedString: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} - name: build windows installer if: matrix.platform == 'windows-latest' + working-directory: ${{ env.working-directory }} run: cargo make msi env: SIGN: true From 7e059a35e27cb91f5cece030e25b87d57bf951be Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Mon, 20 Nov 2023 00:31:18 -0500 Subject: [PATCH 75/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index d11bb6d..1fb58d1 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -12,7 +12,7 @@ jobs: platform: [windows-latest, macos-latest, ubuntu-latest] runs-on: ${{ matrix.platform }} env: - working-directory: ./nym/nym-vpn/desktop + working-directory: nym/nym-vpn/desktop steps: - name: Checkout tools repo uses: actions/checkout@v4 From f4f8d41401643aac569d1b2c24d676370de30454 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Mon, 20 Nov 2023 00:32:13 -0500 Subject: [PATCH 76/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index 1fb58d1..d084882 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -66,8 +66,8 @@ jobs: go-version: 'stable' - name: build ubuntu deb package if: matrix.platform == 'ubuntu-latest' - working-directory: ${{ env.working-directory }} run: cargo make deb + working-directory: ${{ env.working-directory }} - name: inport apple certs if: matrix.platform == 'macos-latest' uses: apple-actions/import-codesign-certs@v2 @@ -84,8 +84,8 @@ jobs: api-private-key: ${{ secrets.APPLE_APPSTORE_PRIVATE_KEY }} - name: build macos pkg if: matrix.platform == 'macos-latest' - working-directory: ${{ env.working-directory }} run: cargo make pkg + working-directory: ${{ env.working-directory }} env: APPLE_TEAM_ID: VW5DZLFHM5 APPLICATION_SIGNING_IDENTITY: Nym Technologies SA @@ -98,8 +98,8 @@ jobs: encodedString: ${{ secrets.WINDOWS_SIGNING_PFX_BASE64 }} - name: build windows installer if: matrix.platform == 'windows-latest' - working-directory: ${{ env.working-directory }} run: cargo make msi + working-directory: ${{ env.working-directory }} env: SIGN: true CERT_FILE: "signing.pfx" From dcdc8d99dc2a909ddf52a266fd8d68625de9c6bf Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Mon, 20 Nov 2023 00:41:07 -0500 Subject: [PATCH 77/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index d084882..3c0f9e7 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -18,7 +18,6 @@ jobs: uses: actions/checkout@v4 with: repository: nymtech/nym - path: nym/nym-vpn/desktop ref: feature/nymvpn-desktop - name: setup node uses: actions/setup-node@v1 From 6f06e9530b0c97d699f2c9b206eb358e913f81ce Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Mon, 20 Nov 2023 00:48:55 -0500 Subject: [PATCH 78/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index 3c0f9e7..44664cd 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -18,6 +18,7 @@ jobs: uses: actions/checkout@v4 with: repository: nymtech/nym + fetch-depth: 0 ref: feature/nymvpn-desktop - name: setup node uses: actions/setup-node@v1 From d517a1d430bd6ae76566b28ff687f14c89d73570 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Mon, 20 Nov 2023 00:56:44 -0500 Subject: [PATCH 79/89] Update nymvpn-desktop.yml --- .github/workflows/nymvpn-desktop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nymvpn-desktop.yml b/.github/workflows/nymvpn-desktop.yml index 44664cd..9925394 100644 --- a/.github/workflows/nymvpn-desktop.yml +++ b/.github/workflows/nymvpn-desktop.yml @@ -12,7 +12,7 @@ jobs: platform: [windows-latest, macos-latest, ubuntu-latest] runs-on: ${{ matrix.platform }} env: - working-directory: nym/nym-vpn/desktop + working-directory: ./nym-vpn/desktop steps: - name: Checkout tools repo uses: actions/checkout@v4 From 0903a165c97cbc4aa8ba26cd3a3c4e705e11c8bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 20 Nov 2023 10:22:16 +0000 Subject: [PATCH 80/89] hashing and stuff --- .github/actions/nym-hash-releases/.gitignore | 2 + .github/actions/nym-hash-releases/action.yml | 25 + .../nym-hash-releases/create-hashes.mjs | 259 +++++++++ .github/actions/nym-hash-releases/index.js | 15 + .../nym-hash-releases/package-lock.json | 536 ++++++++++++++++++ .../actions/nym-hash-releases/package.json | 18 + .../actions/nym-hash-releases/run-local.mjs | 6 + .github/workflows/publish-nym-binaries.yml | 111 ++++ .github/workflows/release-calculate-hash.yml | 39 ++ .gitignore | 1 + 10 files changed, 1012 insertions(+) create mode 100644 .github/actions/nym-hash-releases/.gitignore create mode 100644 .github/actions/nym-hash-releases/action.yml create mode 100644 .github/actions/nym-hash-releases/create-hashes.mjs create mode 100644 .github/actions/nym-hash-releases/index.js create mode 100644 .github/actions/nym-hash-releases/package-lock.json create mode 100644 .github/actions/nym-hash-releases/package.json create mode 100644 .github/actions/nym-hash-releases/run-local.mjs create mode 100644 .github/workflows/publish-nym-binaries.yml create mode 100644 .github/workflows/release-calculate-hash.yml create mode 100644 .gitignore diff --git a/.github/actions/nym-hash-releases/.gitignore b/.github/actions/nym-hash-releases/.gitignore new file mode 100644 index 0000000..5fe9fda --- /dev/null +++ b/.github/actions/nym-hash-releases/.gitignore @@ -0,0 +1,2 @@ +.tmp +hashes.json diff --git a/.github/actions/nym-hash-releases/action.yml b/.github/actions/nym-hash-releases/action.yml new file mode 100644 index 0000000..fbd57ea --- /dev/null +++ b/.github/actions/nym-hash-releases/action.yml @@ -0,0 +1,25 @@ +name: 'Nym Hash Release' +author: 'Nym Technologies SA' +description: 'Generate hashes and signatures for assets in Nym releases' +inputs: + hash-type: + description: 'Type of hash to generate (md5, sha1, sha256, sha512)' + required: false + default: 'sha256' + file-name: + description: 'File name to save as if desired' + required: false + default: 'hashes.json' + release-tag-or-name-or-id: + description: 'The tag/release to process. Uses the release id when trigger from a release.' + required: false + default: '' +outputs: + hashes: + description: 'A string containing JSON with the release asset hashes and signatures' +runs: + using: 'node16' + main: 'index.js' +branding: + icon: 'hash' + color: 'green' diff --git a/.github/actions/nym-hash-releases/create-hashes.mjs b/.github/actions/nym-hash-releases/create-hashes.mjs new file mode 100644 index 0000000..38f7e65 --- /dev/null +++ b/.github/actions/nym-hash-releases/create-hashes.mjs @@ -0,0 +1,259 @@ +import hasha from "hasha"; +import fetch from "node-fetch"; +import { Octokit } from "@octokit/rest"; +import fs from "fs"; +import path from "path"; + +async function run(assets, algorithm, filename, cache) { + try { + fs.mkdirSync('.tmp'); + } catch(e) { + // ignore + } + + const hashes = {}; + let numAwaiting = 0; + for (const asset of assets) { + if (filename === "" || asset.name !== filename) { // don't hash the hash file (if the file has the same name) + numAwaiting++; + + let buffer = null; + let sig = null; + if(cache) { + // cache in `${WORKING_DIR}/.tmp/` + const cacheFilename = path.resolve(`.tmp/${asset.name}`); + if(!fs.existsSync(cacheFilename)) { + console.log(`Downloading ${asset.browser_download_url}... to ${cacheFilename}`); + buffer = Buffer.from(await fetch(asset.browser_download_url).then(res => res.arrayBuffer())); + fs.writeFileSync(cacheFilename, buffer); + } else { + console.log(`Loading from ${cacheFilename}`); + buffer = Buffer.from(fs.readFileSync(cacheFilename)); + + // console.log('Reading signature from content'); + // if(asset.name.endsWith('.sig')) { + // sig = fs.readFileSync(cacheFilename).toString(); + // } + } + } else { + // fetch always + buffer = Buffer.from(await fetch(asset.browser_download_url).then(res => res.arrayBuffer())); + } + if(!hashes[asset.name]) { + hashes[asset.name] = {}; + } + + if(asset.name.endsWith('.sig')) { + sig = buffer.toString(); + } + + hashes[asset.name][algorithm] = hasha(new Uint8Array(buffer), {algorithm: algorithm}); + + let platform; + let kind; + if(asset.name.endsWith('.sig')) { + kind = 'signature'; + } + if(asset.name.endsWith('.app.tar.gz')) { + platform = 'MacOS'; + kind = 'auto-updater'; + } + if(asset.name.endsWith('.app.tar.gz.sig')) { + platform = 'MacOS'; + kind = 'auto-updater-signature'; + } + if(asset.name.endsWith('.dmg')) { + platform = 'MacOS'; + kind = 'installer'; + } + if(asset.name.endsWith('.msi.zip')) { + platform = 'Windows'; + kind = 'auto-updater'; + } + if(asset.name.endsWith('.msi.zip.sig')) { + platform = 'Windows'; + kind = 'auto-updater-signature'; + } + if(asset.name.endsWith('.msi')) { + platform = 'Windows'; + kind = 'installer'; + } + if(asset.name.endsWith('.AppImage.tar.gz')) { + platform = 'Linux'; + kind = 'auto-updater'; + } + if(asset.name.endsWith('.AppImage.tar.gz.sig')) { + platform = 'Linux'; + kind = 'auto-updater-signature'; + } + if(asset.name.endsWith('.AppImage')) { + platform = 'Linux'; + kind = 'installer'; + } + + hashes[asset.name].downloadUrl = asset.browser_download_url; + + if(platform) { + hashes[asset.name].platform = platform; + } + if(kind) { + hashes[asset.name].kind = kind; + } + + // process Tauri signature files + if(asset.name.endsWith('.sig')) { + const otherFilename = asset.name.replace('.sig', ''); + if(!hashes[otherFilename]) { + hashes[otherFilename] = {}; + } + hashes[otherFilename].signature = sig; + } + } + } + return hashes; +} + +export async function createHashes({ assets, algorithm, filename, cache }) { + const output = await run(assets, algorithm, filename, cache); + if(filename?.length) { + fs.writeFileSync(filename, JSON.stringify(output, null, 2)); + } + return output; +} + +export async function createHashesFromReleaseTagOrNameOrId({ releaseTagOrNameOrId, algorithm = 'sha256', filename = 'hashes.json', cache = false, upload = true }) { + console.log("🚀🚀🚀 Getting releases"); + + let auth; + let authStrategy; + if(process.env.GITHUB_TOKEN) { + console.log('Using GITHUB_TOKEN for auth'); + // authStrategy = createActionAuth(); + // auth = await authStrategy(); + } + + const octokit = new Octokit({ + auth: process.env.GITHUB_TOKEN, + request: { fetch } + }); + const owner = "nymtech"; + const repo = "nym"; + + let releases; + if(cache) { + const cacheFilename = path.resolve(`.tmp/releases.json`); + if(!fs.existsSync(cacheFilename)) { + releases = await octokit.paginate( + octokit.rest.repos.listReleases, + { + owner, + repo, + per_page: 100, + }, + (response) => response.data + ); + fs.writeFileSync(cacheFilename, JSON.stringify(releases, null, 2)); + } else { + console.log('Loading releases from cache...'); + releases = JSON.parse(fs.readFileSync(cacheFilename)); + } + } else { + releases = await octokit.paginate( + octokit.rest.repos.listReleases, + { + owner, + repo, + per_page: 100, + }, + (response) => response.data + ) + } + + // process all releases by default + let releasesToProcess = releases; + + // process a single release + if(releaseTagOrNameOrId) { + releasesToProcess = releases.filter(r => { + if (r.tag_name === releaseTagOrNameOrId) { + return true; + } + if (`${r.id}` === `${releaseTagOrNameOrId}`) { + return true; + } + if (r.name === releaseTagOrNameOrId) { + return true; + } + + return false; + }); + } + + releasesToProcess.forEach(release => { + const {tag_name, name} = release; + const tagComponents = tag_name.split('-v'); + const componentName = tagComponents[0]; + const componentVersion = 'v' + tagComponents[1]; + + if(!tagComponents[1] || !name) { + return; + } + + release.componentName = componentName; + release.componentVersion = componentVersion; + }) + + releasesToProcess = releasesToProcess.filter(release => + !!release.name && !!release.componentVersion + ); + + console.log('Releases to process:'); + console.table(releasesToProcess.map(r => { + const { id, name, tag_name, componentName, componentVersion, assets } = r; + return { id, name, tag_name, componentName, componentVersion, assetCount: assets.length }; + })); + + for(const release of releasesToProcess) { + const {id, name, tag_name, html_url, componentName, componentVersion} = release; + + const hashes = await createHashes({ assets: release.assets, algorithm, filename, cache }); + + const output = { + id, name, tag_name, html_url, + componentName, + componentVersion, + assets: hashes, + }; + + if(upload) { + console.log(`🚚 Uploading ${filename} to release name="${release.name}" id=${release.id} (${release.upload_url})...`); + + const exists = (await octokit.repos.listReleaseAssets({ owner, repo, release_id: release.id })).data.find(a => a.name === filename) + if (exists) { + console.log(`Deleting existing asset ${filename}...`); + await octokit.repos.deleteReleaseAsset({ owner, repo, asset_id: exists.id }) + console.log('Deleted existing asset'); + } + + try { + const data = JSON.stringify(output, null, 2); + await octokit.rest.repos.uploadReleaseAsset({ + owner, + repo, + release_id: release.id, + headers: { + 'X-GitHub-Api-Version': '2022-11-28' + }, + name: filename, + data, + }); + console.log('✅ Upload to release is complete.'); + } catch(e) { + console.log('❌ failed to upload:', e.message, e.status, e.response.data); + console.log(e); + process.exit(-1); + } + } + } +} + diff --git a/.github/actions/nym-hash-releases/index.js b/.github/actions/nym-hash-releases/index.js new file mode 100644 index 0000000..eecccba --- /dev/null +++ b/.github/actions/nym-hash-releases/index.js @@ -0,0 +1,15 @@ +import core from "@actions/core"; +import github from "@actions/github"; +import { createHashesFromReleaseTagOrNameOrId } from './create-hashes.mjs'; + +const algorithm = core.getInput('hash-type'); +const filename = core.getInput("file-name"); + +// use the release id from the payload if it is set +const releaseTagOrNameOrId = core.getInput("release-tag-or-name-or-id") || github.context.payload.release?.id; + +try { + await createHashesFromReleaseTagOrNameOrId({ releaseTagOrNameOrId, algorithm, filename }) +} catch (error) { + core.setFailed(error.message); +} diff --git a/.github/actions/nym-hash-releases/package-lock.json b/.github/actions/nym-hash-releases/package-lock.json new file mode 100644 index 0000000..ce1cc09 --- /dev/null +++ b/.github/actions/nym-hash-releases/package-lock.json @@ -0,0 +1,536 @@ +{ + "name": "ghaction-generate-release-hashes", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "ghaction-generate-release-hashes", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@actions/core": "^1.10.0", + "@actions/github": "^5.1.1", + "@octokit/auth-action": "^4.0.0", + "@octokit/rest": "^20.0.1", + "hasha": "^5.2.0", + "node-fetch": "^3.2.10" + } + }, + "node_modules/@actions/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", + "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@actions/github": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz", + "integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==", + "dependencies": { + "@actions/http-client": "^2.0.1", + "@octokit/core": "^3.6.0", + "@octokit/plugin-paginate-rest": "^2.17.0", + "@octokit/plugin-rest-endpoint-methods": "^5.13.0" + } + }, + "node_modules/@actions/http-client": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.1.tgz", + "integrity": "sha512-qhrkRMB40bbbLo7gF+0vu+X+UawOvQQqNAA/5Unx774RS8poaOhThDOG6BGmxvAnxhQnDp2BG/ZUm65xZILTpw==", + "dependencies": { + "tunnel": "^0.0.6" + } + }, + "node_modules/@octokit/auth-action": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-action/-/auth-action-4.0.0.tgz", + "integrity": "sha512-sMm9lWZdiX6e89YFaLrgE9EFs94k58BwIkvjOtozNWUqyTmsrnWFr/M5LolaRzZ7Kmb5FbhF9hi7FEeE274SoQ==", + "dependencies": { + "@octokit/auth-token": "^4.0.0", + "@octokit/types": "^11.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-action/node_modules/@octokit/auth-token": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", + "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz", + "integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw==" + }, + "node_modules/@octokit/auth-action/node_modules/@octokit/types": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-11.1.0.tgz", + "integrity": "sha512-Fz0+7GyLm/bHt8fwEqgvRBWwIV1S6wRRyq+V6exRKLVWaKGsuy6H9QFYeBVDV7rK6fO3XwHgQOPxv+cLj2zpXQ==", + "dependencies": { + "@octokit/openapi-types": "^18.0.0" + } + }, + "node_modules/@octokit/auth-token": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", + "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", + "dependencies": { + "@octokit/types": "^6.0.3" + } + }, + "node_modules/@octokit/core": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", + "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", + "dependencies": { + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.6.3", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/endpoint": { + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", + "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", + "dependencies": { + "@octokit/types": "^6.0.3", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/graphql": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", + "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", + "dependencies": { + "@octokit/request": "^5.6.0", + "@octokit/types": "^6.0.3", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/openapi-types": { + "version": "12.11.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", + "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" + }, + "node_modules/@octokit/plugin-paginate-rest": { + "version": "2.21.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", + "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", + "dependencies": { + "@octokit/types": "^6.40.0" + }, + "peerDependencies": { + "@octokit/core": ">=2" + } + }, + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "5.16.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", + "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", + "dependencies": { + "@octokit/types": "^6.39.0", + "deprecation": "^2.3.1" + }, + "peerDependencies": { + "@octokit/core": ">=3" + } + }, + "node_modules/@octokit/request": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", + "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", + "dependencies": { + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.1.0", + "@octokit/types": "^6.16.1", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/request-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", + "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", + "dependencies": { + "@octokit/types": "^6.0.3", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, + "node_modules/@octokit/request/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/@octokit/rest": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-20.0.1.tgz", + "integrity": "sha512-wROV21RwHQIMNb2Dgd4+pY+dVy1Dwmp85pBrgr6YRRDYRBu9Gb+D73f4Bl2EukZSj5hInq2Tui9o7gAQpc2k2Q==", + "dependencies": { + "@octokit/core": "^5.0.0", + "@octokit/plugin-paginate-rest": "^8.0.0", + "@octokit/plugin-request-log": "^4.0.0", + "@octokit/plugin-rest-endpoint-methods": "^9.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/rest/node_modules/@octokit/auth-token": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", + "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/rest/node_modules/@octokit/core": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.0.0.tgz", + "integrity": "sha512-YbAtMWIrbZ9FCXbLwT9wWB8TyLjq9mxpKdgB3dUNxQcIVTf9hJ70gRPwAcqGZdY6WdJPZ0I7jLaaNDCiloGN2A==", + "dependencies": { + "@octokit/auth-token": "^4.0.0", + "@octokit/graphql": "^7.0.0", + "@octokit/request": "^8.0.2", + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^11.0.0", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/rest/node_modules/@octokit/endpoint": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.0.tgz", + "integrity": "sha512-szrQhiqJ88gghWY2Htt8MqUDO6++E/EIXqJ2ZEp5ma3uGS46o7LZAzSLt49myB7rT+Hfw5Y6gO3LmOxGzHijAQ==", + "dependencies": { + "@octokit/types": "^11.0.0", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/rest/node_modules/@octokit/graphql": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.1.tgz", + "integrity": "sha512-T5S3oZ1JOE58gom6MIcrgwZXzTaxRnxBso58xhozxHpOqSTgDS6YNeEUvZ/kRvXgPrRz/KHnZhtb7jUMRi9E6w==", + "dependencies": { + "@octokit/request": "^8.0.1", + "@octokit/types": "^11.0.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/rest/node_modules/@octokit/openapi-types": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz", + "integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw==" + }, + "node_modules/@octokit/rest/node_modules/@octokit/plugin-paginate-rest": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-8.0.0.tgz", + "integrity": "sha512-2xZ+baZWUg+qudVXnnvXz7qfrTmDeYPCzangBVq/1gXxii/OiS//4shJp9dnCCvj1x+JAm9ji1Egwm1BA47lPQ==", + "dependencies": { + "@octokit/types": "^11.0.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=5" + } + }, + "node_modules/@octokit/rest/node_modules/@octokit/plugin-request-log": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-4.0.0.tgz", + "integrity": "sha512-2uJI1COtYCq8Z4yNSnM231TgH50bRkheQ9+aH8TnZanB6QilOnx8RMD2qsnamSOXtDj0ilxvevf5fGsBhBBzKA==", + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=5" + } + }, + "node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-9.0.0.tgz", + "integrity": "sha512-KquMF/VB1IkKNiVnzJKspY5mFgGyLd7HzdJfVEGTJFzqu9BRFNWt+nwTCMuUiWc72gLQhRWYubTwOkQj+w/1PA==", + "dependencies": { + "@octokit/types": "^11.0.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=5" + } + }, + "node_modules/@octokit/rest/node_modules/@octokit/request": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.1.tgz", + "integrity": "sha512-8N+tdUz4aCqQmXl8FpHYfKG9GelDFd7XGVzyN8rc6WxVlYcfpHECnuRkgquzz+WzvHTK62co5di8gSXnzASZPQ==", + "dependencies": { + "@octokit/endpoint": "^9.0.0", + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^11.1.0", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/rest/node_modules/@octokit/request-error": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.0.tgz", + "integrity": "sha512-1ue0DH0Lif5iEqT52+Rf/hf0RmGO9NWFjrzmrkArpG9trFfDM/efx00BJHdLGuro4BR/gECxCU2Twf5OKrRFsQ==", + "dependencies": { + "@octokit/types": "^11.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@octokit/rest/node_modules/@octokit/types": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-11.1.0.tgz", + "integrity": "sha512-Fz0+7GyLm/bHt8fwEqgvRBWwIV1S6wRRyq+V6exRKLVWaKGsuy6H9QFYeBVDV7rK6fO3XwHgQOPxv+cLj2zpXQ==", + "dependencies": { + "@octokit/openapi-types": "^18.0.0" + } + }, + "node_modules/@octokit/types": { + "version": "6.41.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", + "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", + "dependencies": { + "@octokit/openapi-types": "^12.11.0" + } + }, + "node_modules/before-after-hook": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/hasha": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", + "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", + "dependencies": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/universal-user-agent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + } + } +} diff --git a/.github/actions/nym-hash-releases/package.json b/.github/actions/nym-hash-releases/package.json new file mode 100644 index 0000000..6dcd690 --- /dev/null +++ b/.github/actions/nym-hash-releases/package.json @@ -0,0 +1,18 @@ +{ + "name": "nym-hash-release", + "version": "1.0.0", + "description": "Generate hashes and signatures for assets in Nym releases", + "main": "index.js", + "type": "module", + "scripts": { + "local": "node run-local.mjs" + }, + "dependencies": { + "@actions/core": "^1.10.0", + "@actions/github": "^5.1.1", + "@octokit/auth-action": "^4.0.0", + "@octokit/rest": "^20.0.1", + "hasha": "^5.2.0", + "node-fetch": "^3.2.10" + } +} diff --git a/.github/actions/nym-hash-releases/run-local.mjs b/.github/actions/nym-hash-releases/run-local.mjs new file mode 100644 index 0000000..f2fc6ad --- /dev/null +++ b/.github/actions/nym-hash-releases/run-local.mjs @@ -0,0 +1,6 @@ +import {createHashesFromReleaseTagOrNameOrId} from './create-hashes.mjs'; + +await createHashesFromReleaseTagOrNameOrId({releaseTagOrNameOrId: 119065724, cache: true, upload: false}); +await createHashesFromReleaseTagOrNameOrId({releaseTagOrNameOrId: '119065724', cache: true, upload: false}); +await createHashesFromReleaseTagOrNameOrId({releaseTagOrNameOrId: 'nym-connect-v1.1.19-snickers', cache: true, upload: false}); +await createHashesFromReleaseTagOrNameOrId({releaseTagOrNameOrId: 'Nym Connect v1.1.19-snickers', cache: true, upload: false}); diff --git a/.github/workflows/publish-nym-binaries.yml b/.github/workflows/publish-nym-binaries.yml new file mode 100644 index 0000000..5217051 --- /dev/null +++ b/.github/workflows/publish-nym-binaries.yml @@ -0,0 +1,111 @@ +name: Publish Nym binaries + +on: + workflow_dispatch: + inputs: + add_tokio_unstable: + description: 'True to add RUSTFLAGS="--cfg tokio_unstable"' + required: true + default: false + type: boolean + release: + types: [created] + +env: + NETWORK: mainnet + +jobs: + publish-nym: + if: ${{ (startsWith(github.ref, 'refs/tags/nym-binaries-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }} + strategy: + fail-fast: false + matrix: + platform: [custom-ubuntu-20.04] + runs-on: ${{ matrix.platform }} + + outputs: + release_id: ${{ steps.create-release.outputs.id }} + release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].published_at }} + client_hash: ${{ steps.binary-hashes.outputs.client_hash }} + mixnode_hash: ${{ steps.binary-hashes.outputs.mixnode_hash }} + gateway_hash: ${{ steps.binary-hashes.outputs.gateway_hash }} + socks5_hash: ${{ steps.binary-hashes.outputs.socks5_hash }} + netreq_hash: ${{ steps.binary-hashes.outputs.netreq_hash }} + cli_hash: ${{ steps.binary-hashes.outputs.cli_hash }} + netstat_hash: ${{ steps.binary-hashes.outputs.netstat_hash }} + client_version: ${{ steps.binary-versions.outputs.client_version }} + mixnode_version: ${{ steps.binary-versions.outputs.mixnode_version }} + gateway_version: ${{ steps.binary-versions.outputs.gateway_version }} + socks5_version: ${{ steps.binary-versions.outputs.socks5_version }} + netreq_version: ${{ steps.binary-versions.outputs.netreq_version }} + cli_version: ${{ steps.binary-versions.outputs.cli_version }} + netstat_version: ${{ steps.binary-versions.outputs.netstat_version }} + + steps: + - uses: actions/checkout@v3 + + - name: Install Dependencies (Linux) + run: sudo apt-get update && sudo apt-get -y install ripgrep libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools + continue-on-error: true + + - name: Check out repository code + uses: actions/checkout@v4 + with: + repository: nymtech/nym + ref: ${{ inputs.ref }} + + - name: Sets env vars for tokio if set in manual dispatch inputs + run: | + echo 'RUSTFLAGS="--cfg tokio_unstable"' >> $GITHUB_ENV + if: github.event_name == 'workflow_dispatch' && inputs.add_tokio_unstable == true + + - name: Install Rust stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Build all binaries + uses: actions-rs/cargo@v1 + with: + command: build + args: --workspace + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: my-artifact + path: | + target/release/explorer-api + target/release/nym-client + target/release/nym-gateway + target/release/nym-mixnode + target/release/nym-socks5-client + target/release/nym-api + target/release/nym-network-requester + target/release/nym-network-statistics + target/release/nym-cli + retention-days: 30 + + - id: create-release + name: Upload to release based on tag name + uses: softprops/action-gh-release@v1 + if: github.event_name == 'release' + with: + files: | + target/release/explorer-api + target/release/nym-client + target/release/nym-gateway + target/release/nym-mixnode + target/release/nym-socks5-client + target/release/nym-api + target/release/nym-network-requester + target/release/nym-network-statistics + target/release/nym-cli + + push-release-data-client: + if: ${{ (startsWith(github.ref, 'refs/tags/nym-binaries-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }} + uses: ./.github/workflows/release-calculate-hash.yml + needs: publish-nym + with: + release_tag: ${{ github.ref_name }} + secrets: inherit diff --git a/.github/workflows/release-calculate-hash.yml b/.github/workflows/release-calculate-hash.yml new file mode 100644 index 0000000..4695b08 --- /dev/null +++ b/.github/workflows/release-calculate-hash.yml @@ -0,0 +1,39 @@ +name: Releases - calculate file hashes + +on: + workflow_call: + inputs: + release_tag: + description: 'Release tag' + required: true + type: string + workflow_dispatch: + release_tag: + tag: + description: 'Release tag' + required: true + type: string + +jobs: + build: + name: Calculate hash for assets in release + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install packages + run: cd ./.github/actions/nym-hash-releases && npm i + + - uses: ./.github/actions/nym-hash-releases + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + release-tag-or-name-or-id: ${{ inputs.release_tag }} + + - uses: actions/upload-artifact@v2 + with: + name: Asset Hashes + path: hashes.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..723ef36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file From 5ea8d89b12a94a5551c41cf03463e4f082530bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 20 Nov 2023 10:29:14 +0000 Subject: [PATCH 81/89] use debug builds for faster CI --- .github/workflows/publish-nym-binaries.yml | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/publish-nym-binaries.yml b/.github/workflows/publish-nym-binaries.yml index 5217051..4944658 100644 --- a/.github/workflows/publish-nym-binaries.yml +++ b/.github/workflows/publish-nym-binaries.yml @@ -75,15 +75,15 @@ jobs: with: name: my-artifact path: | - target/release/explorer-api - target/release/nym-client - target/release/nym-gateway - target/release/nym-mixnode - target/release/nym-socks5-client - target/release/nym-api - target/release/nym-network-requester - target/release/nym-network-statistics - target/release/nym-cli + target/debug/explorer-api + target/debug/nym-client + target/debug/nym-gateway + target/debug/nym-mixnode + target/debug/nym-socks5-client + target/debug/nym-api + target/debug/nym-network-requester + target/debug/nym-network-statistics + target/debug/nym-cli retention-days: 30 - id: create-release @@ -92,15 +92,15 @@ jobs: if: github.event_name == 'release' with: files: | - target/release/explorer-api - target/release/nym-client - target/release/nym-gateway - target/release/nym-mixnode - target/release/nym-socks5-client - target/release/nym-api - target/release/nym-network-requester - target/release/nym-network-statistics - target/release/nym-cli + target/debug/explorer-api + target/debug/nym-client + target/debug/nym-gateway + target/debug/nym-mixnode + target/debug/nym-socks5-client + target/debug/nym-api + target/debug/nym-network-requester + target/debug/nym-network-statistics + target/debug/nym-cli push-release-data-client: if: ${{ (startsWith(github.ref, 'refs/tags/nym-binaries-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }} From 570111f00d088b2c82b3ae7c9f37b8f49ae16943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 20 Nov 2023 10:38:54 +0000 Subject: [PATCH 82/89] speed up CI: only upload 2 binaries --- .github/workflows/publish-nym-binaries.yml | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish-nym-binaries.yml b/.github/workflows/publish-nym-binaries.yml index 4944658..6af0dc6 100644 --- a/.github/workflows/publish-nym-binaries.yml +++ b/.github/workflows/publish-nym-binaries.yml @@ -75,15 +75,15 @@ jobs: with: name: my-artifact path: | - target/debug/explorer-api - target/debug/nym-client - target/debug/nym-gateway +# target/debug/explorer-api +# target/debug/nym-client +# target/debug/nym-gateway target/debug/nym-mixnode - target/debug/nym-socks5-client +# target/debug/nym-socks5-client target/debug/nym-api - target/debug/nym-network-requester - target/debug/nym-network-statistics - target/debug/nym-cli +# target/debug/nym-network-requester +# target/debug/nym-network-statistics +# target/debug/nym-cli retention-days: 30 - id: create-release @@ -92,15 +92,15 @@ jobs: if: github.event_name == 'release' with: files: | - target/debug/explorer-api - target/debug/nym-client - target/debug/nym-gateway +# target/debug/explorer-api +# target/debug/nym-client +# target/debug/nym-gateway target/debug/nym-mixnode - target/debug/nym-socks5-client +# target/debug/nym-socks5-client target/debug/nym-api - target/debug/nym-network-requester - target/debug/nym-network-statistics - target/debug/nym-cli +# target/debug/nym-network-requester +# target/debug/nym-network-statistics +# target/debug/nym-cli push-release-data-client: if: ${{ (startsWith(github.ref, 'refs/tags/nym-binaries-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }} From 82eb5d0f9bc423ce3a1e51dcf7e6c4b8518ad0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 20 Nov 2023 10:44:53 +0000 Subject: [PATCH 83/89] ibid. but removed the lines because yaml --- .github/workflows/publish-nym-binaries.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/publish-nym-binaries.yml b/.github/workflows/publish-nym-binaries.yml index 6af0dc6..08bfe38 100644 --- a/.github/workflows/publish-nym-binaries.yml +++ b/.github/workflows/publish-nym-binaries.yml @@ -75,15 +75,8 @@ jobs: with: name: my-artifact path: | -# target/debug/explorer-api -# target/debug/nym-client -# target/debug/nym-gateway target/debug/nym-mixnode -# target/debug/nym-socks5-client target/debug/nym-api -# target/debug/nym-network-requester -# target/debug/nym-network-statistics -# target/debug/nym-cli retention-days: 30 - id: create-release @@ -92,15 +85,8 @@ jobs: if: github.event_name == 'release' with: files: | -# target/debug/explorer-api -# target/debug/nym-client -# target/debug/nym-gateway target/debug/nym-mixnode -# target/debug/nym-socks5-client target/debug/nym-api -# target/debug/nym-network-requester -# target/debug/nym-network-statistics -# target/debug/nym-cli push-release-data-client: if: ${{ (startsWith(github.ref, 'refs/tags/nym-binaries-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }} From 300c96efefa94237a9fdf48ca76aa1c98fe0f88e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 20 Nov 2023 11:46:41 +0000 Subject: [PATCH 84/89] checkout correct repo --- .github/workflows/release-calculate-hash.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release-calculate-hash.yml b/.github/workflows/release-calculate-hash.yml index 4695b08..7a076c7 100644 --- a/.github/workflows/release-calculate-hash.yml +++ b/.github/workflows/release-calculate-hash.yml @@ -21,6 +21,10 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v3 + with: + repository: nymtech/nym + ref: ${{ inputs.ref }} + - uses: actions/setup-node@v3 with: node-version: 18 From 1b892dabc22368ef912224b99e441b303220c3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 20 Nov 2023 11:51:24 +0000 Subject: [PATCH 85/89] using correct repo in hashes --- .github/actions/nym-hash-releases/create-hashes.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/nym-hash-releases/create-hashes.mjs b/.github/actions/nym-hash-releases/create-hashes.mjs index 38f7e65..5bf108b 100644 --- a/.github/actions/nym-hash-releases/create-hashes.mjs +++ b/.github/actions/nym-hash-releases/create-hashes.mjs @@ -137,7 +137,7 @@ export async function createHashesFromReleaseTagOrNameOrId({ releaseTagOrNameOrI request: { fetch } }); const owner = "nymtech"; - const repo = "nym"; + const repo = "ci-playground"; let releases; if(cache) { From a2568227d11ebb0c510ad273db10f7754a38fdce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 20 Nov 2023 11:31:53 +0000 Subject: [PATCH 86/89] empty file --- dummy.tmp | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 dummy.tmp diff --git a/dummy.tmp b/dummy.tmp new file mode 100644 index 0000000..e69de29 From e9beeca88408c55f340297c4fa09575e58d3ab1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 20 Nov 2023 11:56:21 +0000 Subject: [PATCH 87/89] revert 300c96efefa94237a9fdf48ca76aa1c98fe0f88e --- .github/workflows/release-calculate-hash.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/release-calculate-hash.yml b/.github/workflows/release-calculate-hash.yml index 7a076c7..4695b08 100644 --- a/.github/workflows/release-calculate-hash.yml +++ b/.github/workflows/release-calculate-hash.yml @@ -21,10 +21,6 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v3 - with: - repository: nymtech/nym - ref: ${{ inputs.ref }} - - uses: actions/setup-node@v3 with: node-version: 18 From f5dcfcc35e0388a58cb13c5e87dbabbe35740727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 20 Nov 2023 12:00:33 +0000 Subject: [PATCH 88/89] debug --- .github/actions/nym-hash-releases/create-hashes.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/nym-hash-releases/create-hashes.mjs b/.github/actions/nym-hash-releases/create-hashes.mjs index 5bf108b..d2f6ea2 100644 --- a/.github/actions/nym-hash-releases/create-hashes.mjs +++ b/.github/actions/nym-hash-releases/create-hashes.mjs @@ -169,6 +169,9 @@ export async function createHashesFromReleaseTagOrNameOrId({ releaseTagOrNameOrI ) } + console.log("raw releases"); + console.log(releases) + // process all releases by default let releasesToProcess = releases; From 6c6156115fcc09b875d1facd391b4367425b38d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 20 Nov 2023 15:31:36 +0000 Subject: [PATCH 89/89] attempting to add bin info --- .../nym-hash-releases/create-hashes.mjs | 66 ++++++++++++------- .github/workflows/publish-nym-binaries.yml | 12 ++-- 2 files changed, 50 insertions(+), 28 deletions(-) diff --git a/.github/actions/nym-hash-releases/create-hashes.mjs b/.github/actions/nym-hash-releases/create-hashes.mjs index d2f6ea2..8eb81dd 100644 --- a/.github/actions/nym-hash-releases/create-hashes.mjs +++ b/.github/actions/nym-hash-releases/create-hashes.mjs @@ -3,8 +3,27 @@ import fetch from "node-fetch"; import { Octokit } from "@octokit/rest"; import fs from "fs"; import path from "path"; +import { execSync } from "child_process"; + +function getBinInfo(path) { + // let's be super naive about it. add a+x bits on the file and try to run the command + try { + let mode = fs.statSync(path).mode + fs.chmodSync(path, mode | 0o111) + + const raw = execSync(`${path} build-info --output=json`, { stdio: 'pipe', encoding: "utf8" }); + const parsed = JSON.parse(raw) + return parsed + } catch (_) { + return undefined + } +} async function run(assets, algorithm, filename, cache) { + if (!cache) { + console.warn("cache is set to 'false', but we we no longer support it") + } + try { fs.mkdirSync('.tmp'); } catch(e) { @@ -19,26 +38,25 @@ async function run(assets, algorithm, filename, cache) { let buffer = null; let sig = null; - if(cache) { - // cache in `${WORKING_DIR}/.tmp/` - const cacheFilename = path.resolve(`.tmp/${asset.name}`); - if(!fs.existsSync(cacheFilename)) { - console.log(`Downloading ${asset.browser_download_url}... to ${cacheFilename}`); - buffer = Buffer.from(await fetch(asset.browser_download_url).then(res => res.arrayBuffer())); - fs.writeFileSync(cacheFilename, buffer); - } else { - console.log(`Loading from ${cacheFilename}`); - buffer = Buffer.from(fs.readFileSync(cacheFilename)); - - // console.log('Reading signature from content'); - // if(asset.name.endsWith('.sig')) { - // sig = fs.readFileSync(cacheFilename).toString(); - // } - } - } else { - // fetch always + + // cache in `${WORKING_DIR}/.tmp/` + const cacheFilename = path.resolve(`.tmp/${asset.name}`); + if(!fs.existsSync(cacheFilename)) { + console.log(`Downloading ${asset.browser_download_url}... to ${cacheFilename}`); buffer = Buffer.from(await fetch(asset.browser_download_url).then(res => res.arrayBuffer())); + fs.writeFileSync(cacheFilename, buffer); + } else { + console.log(`Loading from ${cacheFilename}`); + buffer = Buffer.from(fs.readFileSync(cacheFilename)); + + // console.log('Reading signature from content'); + // if(asset.name.endsWith('.sig')) { + // sig = fs.readFileSync(cacheFilename).toString(); + // } } + + const binInfo = getBinInfo(cacheFilename) + if(!hashes[asset.name]) { hashes[asset.name] = {}; } @@ -99,6 +117,9 @@ async function run(assets, algorithm, filename, cache) { if(kind) { hashes[asset.name].kind = kind; } + if(binInfo) { + hashes[asset.name].details = binInfo; + } // process Tauri signature files if(asset.name.endsWith('.sig')) { @@ -169,9 +190,6 @@ export async function createHashesFromReleaseTagOrNameOrId({ releaseTagOrNameOrI ) } - console.log("raw releases"); - console.log(releases) - // process all releases by default let releasesToProcess = releases; @@ -216,7 +234,7 @@ export async function createHashesFromReleaseTagOrNameOrId({ releaseTagOrNameOrI return { id, name, tag_name, componentName, componentVersion, assetCount: assets.length }; })); - for(const release of releasesToProcess) { + for(const release of releasesToProcess) { const {id, name, tag_name, html_url, componentName, componentVersion} = release; const hashes = await createHashes({ assets: release.assets, algorithm, filename, cache }); @@ -228,6 +246,8 @@ export async function createHashesFromReleaseTagOrNameOrId({ releaseTagOrNameOrI assets: hashes, }; + console.log(output) + if(upload) { console.log(`🚚 Uploading ${filename} to release name="${release.name}" id=${release.id} (${release.upload_url})...`); @@ -257,6 +277,6 @@ export async function createHashesFromReleaseTagOrNameOrId({ releaseTagOrNameOrI process.exit(-1); } } - } + } } diff --git a/.github/workflows/publish-nym-binaries.yml b/.github/workflows/publish-nym-binaries.yml index 08bfe38..a19fe9a 100644 --- a/.github/workflows/publish-nym-binaries.yml +++ b/.github/workflows/publish-nym-binaries.yml @@ -68,15 +68,16 @@ jobs: uses: actions-rs/cargo@v1 with: command: build - args: --workspace + args: --release - name: Upload Artifact uses: actions/upload-artifact@v3 with: name: my-artifact path: | - target/debug/nym-mixnode - target/debug/nym-api + target/release/nym-mixnode + target/release/nym-api + target/release/explorer-api retention-days: 30 - id: create-release @@ -85,8 +86,9 @@ jobs: if: github.event_name == 'release' with: files: | - target/debug/nym-mixnode - target/debug/nym-api + target/release/nym-mixnode + target/release/nym-api + target/release/explorer-api push-release-data-client: if: ${{ (startsWith(github.ref, 'refs/tags/nym-binaries-') && github.event_name == 'release') || github.event_name == 'workflow_dispatch' }}