From 7bd99bb697fe8d10febeecec66300f830a160c80 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 10:55:58 +0100 Subject: [PATCH 01/19] ci(compile): and publish --- .github/workflows/release.yml | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d7fe240 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,54 @@ +name: Release on Tag +on: + push: + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + +jobs: + # We define the commit hash and also create the release just once or there are errors + create-release: + runs-on: ubuntu-latest + outputs: + # We can access this values in the other jobs + upload_url: ${{ steps.create_release.outputs.upload_url }} + version: ${{ steps.get_version.outputs.version }} + steps: + - name: Get the version + id: get_version + run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//} + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ steps.get_version.outputs.version }} + draft: false + prerelease: false + + build-ubuntu: + runs-on: ubuntu-latest + # We import the values of the other jobs + needs: [create-release] + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Build + run: sudo apt install leveldb g++ -y + - name: Make + run: ./build.sh + - name: Package project + # junk paths remove to recreate the path where is the file inside the zip package + run: zip --junk-paths linux build/dumpsteamcollections + - name: Upload Release Asset + # We upload the binaries to the previous release + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: ./linux.zip + asset_name: linux-${{ needs.create-release.outputs.version }}-dumpsteamcollections.zip + asset_content_type: application/zip From 8b83761115a040d62920efd49dcef91350fe52c5 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 10:56:57 +0100 Subject: [PATCH 02/19] ci(compile): and publish --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d7fe240..cd8be4f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,8 @@ on: push: tags: - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + branch: + - "add-ci-release" jobs: # We define the commit hash and also create the release just once or there are errors From fa5f8d6730dc17837de64af87b3a599aafccc541 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 10:58:49 +0100 Subject: [PATCH 03/19] ci(compile): and publish --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cd8be4f..ee827fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release on Tag on: push: tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + - 'v*' # Push events to matching v*, i.e. v1.0 branch: - "add-ci-release" From 973dc2f72a95604d3031a5e143156e8bb79cb0da Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:00:39 +0100 Subject: [PATCH 04/19] ci(compile): and publish --- .github/workflows/release.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee827fa..e58857e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,9 @@ name: Release on Tag on: - push: - tags: + #push: + # tags: - 'v*' # Push events to matching v*, i.e. v1.0 - branch: - - "add-ci-release" + workflow_dispatch: jobs: # We define the commit hash and also create the release just once or there are errors From 41a61b13b2ba3fba1939435b07ecc58e5a7b52b4 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:01:03 +0100 Subject: [PATCH 05/19] ci(compile): and publish --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e58857e..658b6b8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release on Tag on: #push: # tags: - - 'v*' # Push events to matching v*, i.e. v1.0 + # - 'v*' # Push events to matching v*, i.e. v1.0 workflow_dispatch: jobs: From 92d16f7d6888110b84b95f4aed23289687551c66 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:04:12 +0100 Subject: [PATCH 06/19] ci(compile): and publish --- .github/workflows/release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 658b6b8..ed7d56d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,12 @@ name: Release on Tag on: - #push: + push: # tags: # - 'v*' # Push events to matching v*, i.e. v1.0 - workflow_dispatch: + branches: + - add-ci-release + workflow_dispatch: {} + jobs: # We define the commit hash and also create the release just once or there are errors From 7218848213099c7b07d851909679d53362723521 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:05:34 +0100 Subject: [PATCH 07/19] ci(compile): and publish --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ed7d56d..2547868 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,7 +50,7 @@ jobs: id: upload-release-asset uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # need to be configured to publish the package with: upload_url: ${{ needs.create-release.outputs.upload_url }} asset_path: ./linux.zip From 9abf3a626178eba585e106f34f2dd0f80e978c22 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:12:32 +0100 Subject: [PATCH 08/19] ci(compile): and publish --- .github/workflows/release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2547868..1cb5224 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,15 +19,14 @@ jobs: steps: - name: Get the version id: get_version - run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//} + run: echo "name=version::${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT - name: Create Release id: create_release - uses: actions/create-release@v1 + uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref }} - release_name: ${{ steps.get_version.outputs.version }} draft: false prerelease: false From 94a7b5ba8449d32456b4f7c4401faba4eb7115f4 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:14:02 +0100 Subject: [PATCH 09/19] ci(compile): and publish --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1cb5224..8226c77 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,7 @@ jobs: - name: Create Release id: create_release uses: softprops/action-gh-release@v2 + if: if: startsWith(github.ref, 'refs/') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -49,7 +50,7 @@ jobs: id: upload-release-asset uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # need to be configured to publish the package + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create-release.outputs.upload_url }} asset_path: ./linux.zip From c9ea6e1d3b50c9b62857a31680b0a633662c6f02 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:15:29 +0100 Subject: [PATCH 10/19] ci(compile): and publish --- .github/workflows/release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8226c77..8f9f513 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,9 +23,7 @@ jobs: - name: Create Release id: create_release uses: softprops/action-gh-release@v2 - if: if: startsWith(github.ref, 'refs/') - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + if: startsWith(github.ref, 'refs/') with: tag_name: ${{ github.ref }} draft: false From f575707f3c0c5461aba84bf32b3a2432d06acb17 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:16:19 +0100 Subject: [PATCH 11/19] ci(compile): and publish --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f9f513..5ead8f9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: - name: Create Release id: create_release uses: softprops/action-gh-release@v2 - if: startsWith(github.ref, 'refs/') + if: startsWith(github.ref, 'refs/tags') with: tag_name: ${{ github.ref }} draft: false @@ -32,7 +32,7 @@ jobs: build-ubuntu: runs-on: ubuntu-latest # We import the values of the other jobs - needs: [create-release] + #needs: [create-release] steps: - name: Checkout repo uses: actions/checkout@v4 From c707d43aad34c6b3a0a0c08cf1a1916bbb087443 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:20:17 +0100 Subject: [PATCH 12/19] ci(compile): leveldb --- .github/workflows/release.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ead8f9..d5d9802 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,17 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - name: Build - run: sudo apt install leveldb g++ -y + run: + - sudo apt-get install libsnappy-dev wget curl build-essential cmake gcc libsqlite3-dev libkyotocabinet-dev + - sudo apt install g++ -y + - name: Compile LevelDB + run: + - VER=$(curl -s https://api.github.com/repos/google/leveldb/releases/latest | grep tag_name | cut -d '"' -f 4) + - wget https://github.com/google/leveldb/archive/${VER}.tar.gz -O leveldb.tar.gz + - tar xvf leveldb.tar.gz + - cd leveldb*/ + - mkdir -p build && cd build + - cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build . && make install - name: Make run: ./build.sh - name: Package project From b3005ece8baa8129037811db90ae9c931f0da428 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:28:10 +0100 Subject: [PATCH 13/19] ci(compile): leveldb --- .github/workflows/release.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d5d9802..895a0cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,13 +41,13 @@ jobs: - sudo apt-get install libsnappy-dev wget curl build-essential cmake gcc libsqlite3-dev libkyotocabinet-dev - sudo apt install g++ -y - name: Compile LevelDB - run: - - VER=$(curl -s https://api.github.com/repos/google/leveldb/releases/latest | grep tag_name | cut -d '"' -f 4) - - wget https://github.com/google/leveldb/archive/${VER}.tar.gz -O leveldb.tar.gz - - tar xvf leveldb.tar.gz - - cd leveldb*/ - - mkdir -p build && cd build - - cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build . && make install + run: | + VER=$(curl -s https://api.github.com/repos/google/leveldb/releases/latest | grep tag_name | cut -d '"' -f 4) + wget https://github.com/google/leveldb/archive/${VER}.tar.gz -O leveldb.tar.gz + tar xvf leveldb.tar.gz + cd leveldb*/ + mkdir -p build && cd build + cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build . && make install - name: Make run: ./build.sh - name: Package project From 8eefc76feb23940b7da4bf9daf86ae151d02d96d Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:28:42 +0100 Subject: [PATCH 14/19] ci(compile): leveldb --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 895a0cb..de40923 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,9 +37,9 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - name: Build - run: - - sudo apt-get install libsnappy-dev wget curl build-essential cmake gcc libsqlite3-dev libkyotocabinet-dev - - sudo apt install g++ -y + run: | + sudo apt-get install libsnappy-dev wget curl build-essential cmake gcc libsqlite3-dev libkyotocabinet-dev + sudo apt install g++ -y - name: Compile LevelDB run: | VER=$(curl -s https://api.github.com/repos/google/leveldb/releases/latest | grep tag_name | cut -d '"' -f 4) From 69d109aa524e69a05808be9347862289f97317b9 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:36:45 +0100 Subject: [PATCH 15/19] ci(compile): leveldb --- .github/workflows/release.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de40923..90790ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,18 +36,9 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Build + - name: Install dependencies run: | - sudo apt-get install libsnappy-dev wget curl build-essential cmake gcc libsqlite3-dev libkyotocabinet-dev - sudo apt install g++ -y - - name: Compile LevelDB - run: | - VER=$(curl -s https://api.github.com/repos/google/leveldb/releases/latest | grep tag_name | cut -d '"' -f 4) - wget https://github.com/google/leveldb/archive/${VER}.tar.gz -O leveldb.tar.gz - tar xvf leveldb.tar.gz - cd leveldb*/ - mkdir -p build && cd build - cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build . && make install + sudo apt-get install build-essential libleveldb1d gcc g++ libleveldb-dev -y - name: Make run: ./build.sh - name: Package project From 3ae640e5450352d5508dd1ea631830858e18cf5e Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:39:28 +0100 Subject: [PATCH 16/19] ci(compile): leveldb --- .github/workflows/release.yml | 45 ++++++++++------------------------- 1 file changed, 12 insertions(+), 33 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 90790ad..59da207 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,30 +9,8 @@ on: jobs: - # We define the commit hash and also create the release just once or there are errors - create-release: - runs-on: ubuntu-latest - outputs: - # We can access this values in the other jobs - upload_url: ${{ steps.create_release.outputs.upload_url }} - version: ${{ steps.get_version.outputs.version }} - steps: - - name: Get the version - id: get_version - run: echo "name=version::${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT - - name: Create Release - id: create_release - uses: softprops/action-gh-release@v2 - if: startsWith(github.ref, 'refs/tags') - with: - tag_name: ${{ github.ref }} - draft: false - prerelease: false - build-ubuntu: runs-on: ubuntu-latest - # We import the values of the other jobs - #needs: [create-release] steps: - name: Checkout repo uses: actions/checkout@v4 @@ -43,15 +21,16 @@ jobs: run: ./build.sh - name: Package project # junk paths remove to recreate the path where is the file inside the zip package - run: zip --junk-paths linux build/dumpsteamcollections - - name: Upload Release Asset - # We upload the binaries to the previous release - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: zip --junk-paths linux-dumpsteamcollections build/dumpsteamcollections + - name: Get the version + id: get_version + run: echo "name=version::${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT + - name: Create Release + id: create_release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags') with: - upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: ./linux.zip - asset_name: linux-${{ needs.create-release.outputs.version }}-dumpsteamcollections.zip - asset_content_type: application/zip + tag_name: ${{ github.ref }} + draft: false + prerelease: false + files: linux-dumpsteamcollections.zip From aa74934e7c4accceaffd8eb9e0cfcaf3490e19e3 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:40:49 +0100 Subject: [PATCH 17/19] feat(ci): finished --- .github/workflows/release.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59da207..9eafb9b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,15 +1,12 @@ name: Release on Tag on: push: - # tags: - # - 'v*' # Push events to matching v*, i.e. v1.0 - branches: - - add-ci-release - workflow_dispatch: {} + tags: + - 'v*' # Push events to matching v*, i.e. v1.0 jobs: - build-ubuntu: + build-release: runs-on: ubuntu-latest steps: - name: Checkout repo From 359c350a64cea698dc5e723fae829f41d5a9c04e Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:42:08 +0100 Subject: [PATCH 18/19] feat(ci): finished --- .github/workflows/release.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9eafb9b..865739b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,9 +19,6 @@ jobs: - name: Package project # junk paths remove to recreate the path where is the file inside the zip package run: zip --junk-paths linux-dumpsteamcollections build/dumpsteamcollections - - name: Get the version - id: get_version - run: echo "name=version::${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT - name: Create Release id: create_release uses: softprops/action-gh-release@v2 From d4185e847b78fb39bd28fb84d8dfb28438665d40 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Mar 2024 11:43:13 +0100 Subject: [PATCH 19/19] feat(ci): finished --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 865739b..d48b974 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,8 @@ on: tags: - 'v*' # Push events to matching v*, i.e. v1.0 +permissions: + contents: write jobs: build-release: @@ -24,7 +26,6 @@ jobs: uses: softprops/action-gh-release@v2 if: startsWith(github.ref, 'refs/tags') with: - tag_name: ${{ github.ref }} draft: false prerelease: false files: linux-dumpsteamcollections.zip