From b2093b74054e08f73727a96f2cea8c7f4df71a4f Mon Sep 17 00:00:00 2001 From: Artem IG Date: Sat, 8 Oct 2022 22:03:44 +0300 Subject: [PATCH 1/3] using own binaries to compress themselves --- .github/workflows/ci.yml | 7 ++++--- bin/source/archive.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8780d59..ad05495 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,15 +47,16 @@ jobs: mkdir build dart compile exe bin/exe2dist.dart -o build/exe2dist.exe - - name: Create ZIP with the exe + - name: Compress itself :) run: | - dart script/archive.dart + build/exe2dist.exe exe2dist build/exe2dist.exe build/dist/ + #dart script/archive.dart - name: Store ZIP as artifact uses: actions/upload-artifact@v3 with: name: binary_from_${{ matrix.os }} - path: build/*.zip + path: build/dist/*.zip retention-days: 3 diff --git a/bin/source/archive.dart b/bin/source/archive.dart index e038fe2..8a2401a 100644 --- a/bin/source/archive.dart +++ b/bin/source/archive.dart @@ -116,7 +116,7 @@ Future binaryToDist( {required File sourceExe, required String programName, required Directory targetDir}) async { - createOnNeed(targetDir); + createOnNeed(targetDir); // TODO unit test print("* Source: ${sourceExe.path}"); diff --git a/pubspec.yaml b/pubspec.yaml index 5545690..87debfb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: exe2dist description: Binary executable packaging tool. -version: 0.2.0 +version: 0.2.1 environment: sdk: '>=2.18.0 <3.0.0' From 6996c2b2952ba9c8d10ea60c0724d29db8f91038 Mon Sep 17 00:00:00 2001 From: Artem IG Date: Sat, 8 Oct 2022 22:04:05 +0300 Subject: [PATCH 2/3] publish --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 87debfb..fab49e0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,4 +14,4 @@ dependencies: #args: ^2.3.1 #either_dart: ^0.2.0 glob: ^2.1.0 - path: ^1.8.2 + path: ^1.8.2 \ No newline at end of file From a647312af509af511dcda6285c2267b61f9036e1 Mon Sep 17 00:00:00 2001 From: Artem IG Date: Sat, 8 Oct 2022 22:06:26 +0300 Subject: [PATCH 3/3] publish --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad05495..ef6de30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,11 +52,11 @@ jobs: build/exe2dist.exe exe2dist build/exe2dist.exe build/dist/ #dart script/archive.dart - - name: Store ZIP as artifact + - name: Store ZIP or TGZ as artifact uses: actions/upload-artifact@v3 with: name: binary_from_${{ matrix.os }} - path: build/dist/*.zip + path: build/dist/* retention-days: 3