From fc839ca603594c90d577e9af193046594edf7c08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Wed, 3 Mar 2021 14:40:05 +0100 Subject: [PATCH 01/36] add moving latest tag ci --- .github/workflows/moving-latest-tag.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/moving-latest-tag.yml diff --git a/.github/workflows/moving-latest-tag.yml b/.github/workflows/moving-latest-tag.yml new file mode 100644 index 00000000..3b3bfbaa --- /dev/null +++ b/.github/workflows/moving-latest-tag.yml @@ -0,0 +1,15 @@ +name: Set a moving latest tag that always points to the latest release + +on: + release: + types: [published, edited] + +jobs: + actions-tagger: + runs-on: windows-latest + steps: + - uses: Actions-R-Us/actions-tagger@latest + env: + GITHUB_TOKEN: "${{ github.token }}" + with: + publish_latest_tag: true From c6d9b745173f7a31d0b698210cd1ab12b8f5b753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Wed, 3 Mar 2021 15:43:13 +0100 Subject: [PATCH 02/36] use latest-tag after release --- .github/workflows/build-test-release-client-packages.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index f50ef01a..d3ac43d4 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -376,3 +376,10 @@ jobs: asset_path: ${{ steps.find_filenames.outputs.tarfile }} asset_name: ${{ steps.find_filenames.outputs.tarfile }} asset_content_type: application/x-tar + + moving_latest_tag: + needs: release + steps: + - name: Run latest-tag + - uses: uses: EndBug/latest-tag@latest + From b9ff16f126c23fd211f4466835cc736379920841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Wed, 3 Mar 2021 15:43:28 +0100 Subject: [PATCH 03/36] remove moving-latest-tag.yml --- .github/workflows/moving-latest-tag.yml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .github/workflows/moving-latest-tag.yml diff --git a/.github/workflows/moving-latest-tag.yml b/.github/workflows/moving-latest-tag.yml deleted file mode 100644 index 3b3bfbaa..00000000 --- a/.github/workflows/moving-latest-tag.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Set a moving latest tag that always points to the latest release - -on: - release: - types: [published, edited] - -jobs: - actions-tagger: - runs-on: windows-latest - steps: - - uses: Actions-R-Us/actions-tagger@latest - env: - GITHUB_TOKEN: "${{ github.token }}" - with: - publish_latest_tag: true From c57ae38bbf35f011095c8c06d94bff641e9895a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Wed, 3 Mar 2021 15:46:04 +0100 Subject: [PATCH 04/36] fix syntax --- .github/workflows/build-test-release-client-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index d3ac43d4..c1c54f24 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -381,5 +381,5 @@ jobs: needs: release steps: - name: Run latest-tag - - uses: uses: EndBug/latest-tag@latest + uses: uses: EndBug/latest-tag@latest From acc6c20ad0d6ef6e43257f270e677bbe92be721c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Wed, 3 Mar 2021 15:47:35 +0100 Subject: [PATCH 05/36] fix syntax --- .github/workflows/build-test-release-client-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index c1c54f24..425748df 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -381,5 +381,5 @@ jobs: needs: release steps: - name: Run latest-tag - uses: uses: EndBug/latest-tag@latest + uses: EndBug/latest-tag@latest From a8c415e20c7d7c4b0dda5f2025f3c2f94c57fd3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Wed, 3 Mar 2021 15:48:30 +0100 Subject: [PATCH 06/36] add runs-on --- .github/workflows/build-test-release-client-packages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 425748df..15a819f7 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -379,6 +379,7 @@ jobs: moving_latest_tag: needs: release + runs-on: ubuntu-latest steps: - name: Run latest-tag uses: EndBug/latest-tag@latest From 3f1a4e02ac3cdceebe4f683ef2de59c36dd74dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Wed, 3 Mar 2021 16:36:13 +0100 Subject: [PATCH 07/36] add checkout step --- .github/workflows/build-test-release-client-packages.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 15a819f7..694d19d0 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -381,6 +381,9 @@ jobs: needs: release runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Run latest-tag uses: EndBug/latest-tag@latest From 6ea97b28b6f3d182c40e427faa8d02861136b6b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Wed, 3 Mar 2021 16:55:57 +0100 Subject: [PATCH 08/36] trigger ci for tags named latest --- .github/workflows/build-test-release-client-packages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 694d19d0..898378f6 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -6,6 +6,7 @@ on: - main tags: - 'v*' + - latest pull_request: branches: - main From e0b7a380efad4bd58aeefb85e5b676cadb516794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Wed, 3 Mar 2021 22:07:31 +0100 Subject: [PATCH 09/36] upload assets twice --- .../build-test-release-client-packages.yml | 46 +++++++++++++++---- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 898378f6..892e367b 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -6,7 +6,6 @@ on: - main tags: - 'v*' - - latest pull_request: branches: - main @@ -378,13 +377,42 @@ jobs: asset_name: ${{ steps.find_filenames.outputs.tarfile }} asset_content_type: application/x-tar - moving_latest_tag: - needs: release - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 + - name: Upload RPM as release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ steps.find_filenames.outputs.rpmfile }} + asset_name: eessi-cvmfs-config-latest.rpm + asset_content_type: application/x-rpm - - name: Run latest-tag - uses: EndBug/latest-tag@latest + - name: Upload Deb as release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ steps.find_filenames.outputs.debfile }} + asset_name: eessi-cvmfs-config-latest.deb + asset_content_type: application/x-deb + + - name: Upload Pkg as release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ steps.find_filenames.outputs.pkgfile }} + asset_name: eessi-cvmfs-config-latest.pkg + asset_content_type: application/x-newton-compatible-pkg + - name: Upload Tar as release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ steps.find_filenames.outputs.tarfile }} + asset_name: eessi-cvmfs-config-latest.tar + asset_content_type: application/x-tar From 6f72cdfe680ec01d5baa3bb26c938568c83add22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 4 Mar 2021 09:26:09 +0100 Subject: [PATCH 10/36] create latest release --- .../build-test-release-client-packages.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 892e367b..6113fa6c 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -377,12 +377,23 @@ jobs: asset_name: ${{ steps.find_filenames.outputs.tarfile }} asset_content_type: application/x-tar + - name: Create Release + id: create_latest_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: latest + release_name: Filesystem Layer latest release + draft: true + prerelease: false + - name: Upload RPM as release asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ steps.create_latest_release.outputs.upload_url }} asset_path: ${{ steps.find_filenames.outputs.rpmfile }} asset_name: eessi-cvmfs-config-latest.rpm asset_content_type: application/x-rpm @@ -392,7 +403,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ steps.create_latest_release.outputs.upload_url }} asset_path: ${{ steps.find_filenames.outputs.debfile }} asset_name: eessi-cvmfs-config-latest.deb asset_content_type: application/x-deb @@ -402,7 +413,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ steps.create_latest_release.outputs.upload_url }} asset_path: ${{ steps.find_filenames.outputs.pkgfile }} asset_name: eessi-cvmfs-config-latest.pkg asset_content_type: application/x-newton-compatible-pkg @@ -412,7 +423,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ steps.create_latest_release.outputs.upload_url }} asset_path: ${{ steps.find_filenames.outputs.tarfile }} asset_name: eessi-cvmfs-config-latest.tar asset_content_type: application/x-tar From 33aaa5c7ff9f78e825d6a94dd3ee0499ea257cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 4 Mar 2021 09:42:33 +0100 Subject: [PATCH 11/36] create latest tag --- .github/workflows/build-test-release-client-packages.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 6113fa6c..44b31fc6 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -377,6 +377,9 @@ jobs: asset_name: ${{ steps.find_filenames.outputs.tarfile }} asset_content_type: application/x-tar + - name: Run latest-tag + uses: EndBug/latest-tag@latest + - name: Create Release id: create_latest_release uses: actions/create-release@v1 @@ -385,7 +388,7 @@ jobs: with: tag_name: latest release_name: Filesystem Layer latest release - draft: true + draft: false prerelease: false - name: Upload RPM as release asset From 09f67ff9d55f36ec55447536f04fb0c24ff7c5aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 4 Mar 2021 09:57:13 +0100 Subject: [PATCH 12/36] add checkout step --- .github/workflows/build-test-release-client-packages.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 44b31fc6..976fb847 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -377,6 +377,9 @@ jobs: asset_name: ${{ steps.find_filenames.outputs.tarfile }} asset_content_type: application/x-tar + - name: Checkout + uses: actions/checkout@v2 + - name: Run latest-tag uses: EndBug/latest-tag@latest From 2199c4afeba3c49d3be3748fbe7689a44e38a9d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 4 Mar 2021 10:10:55 +0100 Subject: [PATCH 13/36] switch order --- .github/workflows/build-test-release-client-packages.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 976fb847..31c445cc 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -293,6 +293,9 @@ jobs: if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Download Deb package uses: actions/download-artifact@v2 with: @@ -377,9 +380,6 @@ jobs: asset_name: ${{ steps.find_filenames.outputs.tarfile }} asset_content_type: application/x-tar - - name: Checkout - uses: actions/checkout@v2 - - name: Run latest-tag uses: EndBug/latest-tag@latest From 61d819ed85aeddc48ee3fcc0df7425b271546326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 4 Mar 2021 10:31:27 +0100 Subject: [PATCH 14/36] remove existing latest tag/release --- .github/workflows/build-test-release-client-packages.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 31c445cc..4623ee7d 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -380,6 +380,13 @@ jobs: asset_name: ${{ steps.find_filenames.outputs.tarfile }} asset_content_type: application/x-tar + - uses: dev-drprasad/delete-tag-and-release@v0.1.3 + with: + delete_release: true # default: false + tag_name: latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Run latest-tag uses: EndBug/latest-tag@latest From 07d0c03a3bce7127d634ec12c64d2dde2e5f2daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 4 Mar 2021 13:28:52 +0100 Subject: [PATCH 15/36] upload all assets in one go --- .../build-test-release-client-packages.yml | 88 +++---------------- 1 file changed, 14 insertions(+), 74 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 4623ee7d..37ebbe52 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -340,47 +340,15 @@ jobs: draft: false prerelease: false - - name: Upload RPM as release asset - uses: actions/upload-release-asset@v1 + - name: Upload all assets + uses: alexellis/upload-assets@0.2.2 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ steps.find_filenames.outputs.rpmfile }} - asset_name: ${{ steps.find_filenames.outputs.rpmfile }} - asset_content_type: application/x-rpm - - - name: Upload Deb as release asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ steps.find_filenames.outputs.debfile }} - asset_name: ${{ steps.find_filenames.outputs.debfile }} - asset_content_type: application/x-deb - - - name: Upload Pkg as release asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ steps.find_filenames.outputs.pkgfile }} - asset_name: ${{ steps.find_filenames.outputs.pkgfile }} - asset_content_type: application/x-newton-compatible-pkg - - - name: Upload Tar as release asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ steps.find_filenames.outputs.tarfile }} - asset_name: ${{ steps.find_filenames.outputs.tarfile }} - asset_content_type: application/x-tar + asset_paths: '["eessi-cvmfs-config*"]' - - uses: dev-drprasad/delete-tag-and-release@v0.1.3 + - name: Delete any previous tag/release named "latest" + uses: dev-drprasad/delete-tag-and-release@v0.1.3 with: delete_release: true # default: false tag_name: latest @@ -401,42 +369,14 @@ jobs: draft: false prerelease: false - - name: Upload RPM as release asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_latest_release.outputs.upload_url }} - asset_path: ${{ steps.find_filenames.outputs.rpmfile }} - asset_name: eessi-cvmfs-config-latest.rpm - asset_content_type: application/x-rpm - - - name: Upload Deb as release asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_latest_release.outputs.upload_url }} - asset_path: ${{ steps.find_filenames.outputs.debfile }} - asset_name: eessi-cvmfs-config-latest.deb - asset_content_type: application/x-deb - - - name: Upload Pkg as release asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_latest_release.outputs.upload_url }} - asset_path: ${{ steps.find_filenames.outputs.pkgfile }} - asset_name: eessi-cvmfs-config-latest.pkg - asset_content_type: application/x-newton-compatible-pkg + - name: Rename assets + run: | + sudo apt-get install rename + rename -n "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" eessi-cvmfs-config* - - name: Upload Tar as release asset - uses: actions/upload-release-asset@v1 + - name: Upload all assets + uses: alexellis/upload-assets@0.2.2 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.create_latest_release.outputs.upload_url }} - asset_path: ${{ steps.find_filenames.outputs.tarfile }} - asset_name: eessi-cvmfs-config-latest.tar - asset_content_type: application/x-tar + asset_paths: '["eessi-cvmfs-config*latest*"]' From 48095f669cf071134eed2d492c09bff70766b989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 4 Mar 2021 13:44:01 +0100 Subject: [PATCH 16/36] add ls, add ./ to assets --- .../workflows/build-test-release-client-packages.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 37ebbe52..6706592b 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -340,12 +340,15 @@ jobs: draft: false prerelease: false + -name: ls + run: ls "./eessi-cvmfs-config*" + - name: Upload all assets uses: alexellis/upload-assets@0.2.2 env: GITHUB_TOKEN: ${{ github.token }} with: - asset_paths: '["eessi-cvmfs-config*"]' + asset_paths: '["./eessi-cvmfs-config*"]' - name: Delete any previous tag/release named "latest" uses: dev-drprasad/delete-tag-and-release@v0.1.3 @@ -374,9 +377,12 @@ jobs: sudo apt-get install rename rename -n "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" eessi-cvmfs-config* + -name: ls + run: ls "eessi-cvmfs-config*latest*" + - name: Upload all assets uses: alexellis/upload-assets@0.2.2 env: GITHUB_TOKEN: ${{ github.token }} with: - asset_paths: '["eessi-cvmfs-config*latest*"]' + asset_paths: '["./eessi-cvmfs-config*latest*"]' From b917c7bb1150ea47f4f4669ea0933423bc1b44c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 4 Mar 2021 13:45:15 +0100 Subject: [PATCH 17/36] fix syntax --- .github/workflows/build-test-release-client-packages.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 6706592b..82636232 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -340,8 +340,8 @@ jobs: draft: false prerelease: false - -name: ls - run: ls "./eessi-cvmfs-config*" + - name: ls + run: ls "./eessi-cvmfs-config*" - name: Upload all assets uses: alexellis/upload-assets@0.2.2 @@ -377,8 +377,8 @@ jobs: sudo apt-get install rename rename -n "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" eessi-cvmfs-config* - -name: ls - run: ls "eessi-cvmfs-config*latest*" + - name: ls + run: ls "eessi-cvmfs-config*latest*" - name: Upload all assets uses: alexellis/upload-assets@0.2.2 From fd02161fb0231c184b382b89252fac49b4dfccab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 4 Mar 2021 16:12:12 +0100 Subject: [PATCH 18/36] fix filenames --- .../workflows/build-test-release-client-packages.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 82636232..33cb53f2 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -341,14 +341,14 @@ jobs: prerelease: false - name: ls - run: ls "./eessi-cvmfs-config*" + run: ls "./cvmfs-config-eessi*" - name: Upload all assets uses: alexellis/upload-assets@0.2.2 env: GITHUB_TOKEN: ${{ github.token }} with: - asset_paths: '["./eessi-cvmfs-config*"]' + asset_paths: '["./cvmfs-config-eessi*"]' - name: Delete any previous tag/release named "latest" uses: dev-drprasad/delete-tag-and-release@v0.1.3 @@ -375,14 +375,14 @@ jobs: - name: Rename assets run: | sudo apt-get install rename - rename -n "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" eessi-cvmfs-config* + rename -n "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" cvmfs-config-eessi* - name: ls - run: ls "eessi-cvmfs-config*latest*" + run: ls "cvmfs-config-eessi-*latest*" - name: Upload all assets uses: alexellis/upload-assets@0.2.2 env: GITHUB_TOKEN: ${{ github.token }} with: - asset_paths: '["./eessi-cvmfs-config*latest*"]' + asset_paths: '["./cvmfs-config-eessi*latest*"]' From 379e06d9d8eded7f3aa34a2051a491cf113b0c5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 4 Mar 2021 16:54:12 +0100 Subject: [PATCH 19/36] use ls to debug issue --- .github/workflows/build-test-release-client-packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 33cb53f2..3de48baa 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -341,7 +341,7 @@ jobs: prerelease: false - name: ls - run: ls "./cvmfs-config-eessi*" + run: ls - name: Upload all assets uses: alexellis/upload-assets@0.2.2 @@ -378,7 +378,7 @@ jobs: rename -n "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" cvmfs-config-eessi* - name: ls - run: ls "cvmfs-config-eessi-*latest*" + run: ls - name: Upload all assets uses: alexellis/upload-assets@0.2.2 From df5e3bc80f040d75cdf19d20efc6853b6f1ad205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 4 Mar 2021 17:29:08 +0100 Subject: [PATCH 20/36] remove ls commands, remove -n flag for rename --- .github/workflows/build-test-release-client-packages.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 3de48baa..030eec3e 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -340,9 +340,6 @@ jobs: draft: false prerelease: false - - name: ls - run: ls - - name: Upload all assets uses: alexellis/upload-assets@0.2.2 env: @@ -375,10 +372,7 @@ jobs: - name: Rename assets run: | sudo apt-get install rename - rename -n "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" cvmfs-config-eessi* - - - name: ls - run: ls + rename "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" ./cvmfs-config-eessi* - name: Upload all assets uses: alexellis/upload-assets@0.2.2 From a3560cfc14675d966b91695a47eb20f5c5381baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 4 Mar 2021 18:02:18 +0100 Subject: [PATCH 21/36] use different action for making release --- .../build-test-release-client-packages.yml | 30 +++++++------------ 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 030eec3e..e0769276 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -355,28 +355,20 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Run latest-tag - uses: EndBug/latest-tag@latest - - - name: Create Release - id: create_latest_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: latest - release_name: Filesystem Layer latest release - draft: false - prerelease: false - - name: Rename assets + id: rename_files run: | sudo apt-get install rename rename "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" ./cvmfs-config-eessi* + echo ::set-output name=packages::$(ls -1 cvmfs-config-eessi*latest*) - - name: Upload all assets - uses: alexellis/upload-assets@0.2.2 - env: - GITHUB_TOKEN: ${{ github.token }} + - uses: meeDamian/github-release@2.0 with: - asset_paths: '["./cvmfs-config-eessi*latest*"]' + token: ${{ secrets.GITHUB_TOKEN }} + tag: latest + name: Filesystem Layer latest release + body: > + This is a moving release that always points to the latest release. + It allows you to easily download the assets. + gzip: no + files: ${{ steps.rename_files.outputs.packages }} From f2e67d0ebdccf6e4d41d8aefd27897b3e6078848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 4 Mar 2021 18:18:56 +0100 Subject: [PATCH 22/36] change gzip to false --- .github/workflows/build-test-release-client-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index e0769276..cbc51c4d 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -370,5 +370,5 @@ jobs: body: > This is a moving release that always points to the latest release. It allows you to easily download the assets. - gzip: no + gzip: false files: ${{ steps.rename_files.outputs.packages }} From 893ed1699b67b327cec6cae564d7e7eea7b4bb52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 4 Mar 2021 18:19:23 +0100 Subject: [PATCH 23/36] only run on tags for now --- .github/workflows/build-test-release-client-packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index cbc51c4d..6fb4bfc8 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -2,8 +2,8 @@ name: Build, test, and release client packages on: push: - branches: - - main +# branches: +# - main tags: - 'v*' pull_request: From 9b01419af61b31804a9351c1e27c17de2949fa1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 5 Mar 2021 09:53:45 +0100 Subject: [PATCH 24/36] download all artifacts in one go, use same action for real release --- .../build-test-release-client-packages.yml | 59 ++++--------------- 1 file changed, 13 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 6fb4bfc8..de767510 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -296,56 +296,23 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Download Deb package - uses: actions/download-artifact@v2 - with: - name: Deb package - - - name: Download RPM package - uses: actions/download-artifact@v2 - with: - name: RPM package - - - name: Download tar package - uses: actions/download-artifact@v2 - with: - name: Tar package - - - name: Download macOS package - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v2 with: - name: macOS package + path: ./build_artifacts - name: Find filenames of downloaded packages id: find_filenames shell: bash - run: | - rpmfile="$(ls -1 cvmfs-config-eessi*.rpm)" - debfile="$(ls -1 cvmfs-config-eessi*.deb)" - pkgfile="$(ls -1 cvmfs-config-eessi*.pkg)" - tarfile="$(ls -1 cvmfs-config-eessi*.tar)" - echo ::set-output name=rpmfile::${rpmfile} - echo ::set-output name=debfile::${debfile} - echo ::set-output name=pkgfile::${pkgfile} - echo ::set-output name=tarfile::${tarfile} + run: echo ::set-output name=package_filenames::$(ls -1 -R ./build_artifacts/cvmfs-config-eessi*) - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Filesystem Layer ${{ github.ref }} - draft: false - prerelease: false - - - name: Upload all assets - uses: alexellis/upload-assets@0.2.2 - env: - GITHUB_TOKEN: ${{ github.token }} + - uses: meeDamian/github-release@2.0 with: - asset_paths: '["./cvmfs-config-eessi*"]' + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref }} + name: Filesystem Layer ${{ github.ref }} + body: > + Filesystem Layer release ${{ github.ref }} + files: ${{ steps.find_filenames.outputs.package_filenames }} - name: Delete any previous tag/release named "latest" uses: dev-drprasad/delete-tag-and-release@v0.1.3 @@ -359,8 +326,8 @@ jobs: id: rename_files run: | sudo apt-get install rename - rename "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" ./cvmfs-config-eessi* - echo ::set-output name=packages::$(ls -1 cvmfs-config-eessi*latest*) + rename "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" ${{ steps.find_filenames.outputs.package_filenames }} + echo ::set-output name=package_filenames::$(ls -1 -R ./build_artifacts/cvmfs-config-eessi*latest*) - uses: meeDamian/github-release@2.0 with: @@ -371,4 +338,4 @@ jobs: This is a moving release that always points to the latest release. It allows you to easily download the assets. gzip: false - files: ${{ steps.rename_files.outputs.packages }} + files: ${{ steps.rename_files.outputs.package_filenames }} From fe4d06f487acc2299549d7b340f81aa90cd91803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 5 Mar 2021 10:06:15 +0100 Subject: [PATCH 25/36] use find command to find filenames --- .github/workflows/build-test-release-client-packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index de767510..b8869e2f 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -303,7 +303,7 @@ jobs: - name: Find filenames of downloaded packages id: find_filenames shell: bash - run: echo ::set-output name=package_filenames::$(ls -1 -R ./build_artifacts/cvmfs-config-eessi*) + run: echo ::set-output name=package_filenames::$(find ./build_artifacts -name cvmfs-config-eessi*) - uses: meeDamian/github-release@2.0 with: @@ -327,7 +327,7 @@ jobs: run: | sudo apt-get install rename rename "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" ${{ steps.find_filenames.outputs.package_filenames }} - echo ::set-output name=package_filenames::$(ls -1 -R ./build_artifacts/cvmfs-config-eessi*latest*) + echo ::set-output name=package_filenames::$(find ./build_artifacts -name cvmfs-config-eessi*latest*) - uses: meeDamian/github-release@2.0 with: From f87e9bc4b8855630173f6971015f33b10858bd22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 5 Mar 2021 10:26:51 +0100 Subject: [PATCH 26/36] add ls command to debug issue --- .github/workflows/build-test-release-client-packages.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index b8869e2f..34c5c1f5 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -303,7 +303,9 @@ jobs: - name: Find filenames of downloaded packages id: find_filenames shell: bash - run: echo ::set-output name=package_filenames::$(find ./build_artifacts -name cvmfs-config-eessi*) + run: | + ls -1 -R ./build_artifacts + echo ::set-output name=package_filenames::$(find ./build_artifacts -name cvmfs-config-eessi*) - uses: meeDamian/github-release@2.0 with: From 3d0446ab2c3aa49d87af68678ecc7c4bd2114551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 5 Mar 2021 10:48:01 +0100 Subject: [PATCH 27/36] upload all artifacts in one go --- .../build-test-release-client-packages.yml | 43 +++++-------------- 1 file changed, 10 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 34c5c1f5..bb27682e 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -63,34 +63,11 @@ jobs: fpm_args: "etc" fpm_opts: "--debug -n cvmfs-config-eessi-${{ steps.get_version.outputs.version }} -t tar -a all -s dir -C ./package --description 'CVMFS configuration package for EESSI.'" - - name: Find filenames of generated packages - id: find_filenames - shell: bash - run: | - rpmfile="$(ls -1 cvmfs-config-eessi*.rpm)" - debfile="$(ls -1 cvmfs-config-eessi*.deb)" - tarfile="$(ls -1 cvmfs-config-eessi*.tar)" - echo ::set-output name=rpmfile::${rpmfile} - echo ::set-output name=debfile::${debfile} - echo ::set-output name=tarfile::${tarfile} - - - name: Upload Deb package as artifact + - name: Upload packages as build artifacts uses: actions/upload-artifact@v2 with: - name: Deb package - path: ${{ steps.find_filenames.outputs.debfile }} - - - name: Upload RPM package as artifact - uses: actions/upload-artifact@v2 - with: - name: RPM package - path: ${{ steps.find_filenames.outputs.rpmfile }} - - - name: Upload tar package as artifact - uses: actions/upload-artifact@v2 - with: - name: Tar package - path: ${{ steps.find_filenames.outputs.tarfile }} + name: linux_packages + path: cvmfs-config-eessi* build-macos-package: runs-on: macos-latest @@ -138,7 +115,7 @@ jobs: - name: Upload macOS package as artifact uses: actions/upload-artifact@v2 with: - name: macOS package + name: macos_package path: ${{ steps.find_filename.outputs.pkgfile }} test-deb-package: @@ -157,13 +134,13 @@ jobs: - name: Download cvmfs-config-eessi package uses: actions/download-artifact@v2 with: - name: Deb package + name: linux_packages - name: Find filename of package id: find_filename shell: bash run: | - debfile="$(ls -1 cvmfs-config-eessi*.deb)" + debfile="$(find . -name cvmfs-config-eessi*.deb)" echo ::set-output name=debfile::${debfile} - name: Install package @@ -195,13 +172,13 @@ jobs: - name: Download cvmfs-config-eessi package uses: actions/download-artifact@v2 with: - name: RPM package + name: linux_packages - name: Find filename of package id: find_filename shell: bash run: | - rpmfile="$(ls -1 cvmfs-config-eessi*.rpm)" + rpmfile="$(find . -name cvmfs-config-eessi*.rpm)" echo ::set-output name=rpmfile::${rpmfile} - name: Install package @@ -233,13 +210,13 @@ jobs: - name: Download cvmfs-config-eessi package uses: actions/download-artifact@v2 with: - name: Tar package + name: linux_packages - name: Find filename of package id: find_filename shell: bash run: | - tarfile="$(ls -1 cvmfs-config-eessi*.tar)" + tarfile="$(find . -name cvmfs-config-eessi*.tar)" echo ::set-output name=tarfile::${tarfile} - name: Install package From 2a7dce959a4e939f026532ebacbe3c4567e399df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 5 Mar 2021 10:57:47 +0100 Subject: [PATCH 28/36] fix name of macos artifact --- .github/workflows/build-test-release-client-packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index bb27682e..4a92ff78 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -244,13 +244,13 @@ jobs: - name: Download cvmfs-config-eessi package uses: actions/download-artifact@v2 with: - name: macOS package + name: macos_package - name: Find filename of package id: find_filename shell: bash run: | - pkgfile="$(ls -1 cvmfs-config-eessi*.pkg)" + pkgfile="$(find . -name cvmfs-config-eessi*.pkg)" echo ::set-output name=pkgfile::${pkgfile} - name: Install package From ed1892e04411714b01a4e671f50dcfc6f3c7f22f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 5 Mar 2021 11:28:38 +0100 Subject: [PATCH 29/36] fix version number --- .../build-test-release-client-packages.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 4a92ff78..cc113421 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -273,6 +273,11 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Find release version in tag + id: find_version + run: | + echo ::set-output name=version::${GITHUB_REF#refs/tags/} + - uses: actions/download-artifact@v2 with: path: ./build_artifacts @@ -287,10 +292,10 @@ jobs: - uses: meeDamian/github-release@2.0 with: token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ github.ref }} - name: Filesystem Layer ${{ github.ref }} + tag: ${{ steps.find_version.outputs.version }} + name: Filesystem Layer ${{ steps.find_version.outputs.version }} body: > - Filesystem Layer release ${{ github.ref }} + Filesystem Layer release ${{ steps.find_version.outputs.version }} files: ${{ steps.find_filenames.outputs.package_filenames }} - name: Delete any previous tag/release named "latest" @@ -306,6 +311,7 @@ jobs: run: | sudo apt-get install rename rename "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" ${{ steps.find_filenames.outputs.package_filenames }} + ls -1 -R ./build_artifacts echo ::set-output name=package_filenames::$(find ./build_artifacts -name cvmfs-config-eessi*latest*) - uses: meeDamian/github-release@2.0 @@ -316,5 +322,4 @@ jobs: body: > This is a moving release that always points to the latest release. It allows you to easily download the assets. - gzip: false files: ${{ steps.rename_files.outputs.package_filenames }} From 6b316b94ba681154a6790f76f3653bf6d72ce0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 5 Mar 2021 11:49:59 +0100 Subject: [PATCH 30/36] override latest with other step --- .../build-test-release-client-packages.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index cc113421..3aff6d3e 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -286,7 +286,7 @@ jobs: id: find_filenames shell: bash run: | - ls -1 -R ./build_artifacts + ls -1 -R . echo ::set-output name=package_filenames::$(find ./build_artifacts -name cvmfs-config-eessi*) - uses: meeDamian/github-release@2.0 @@ -297,14 +297,15 @@ jobs: body: > Filesystem Layer release ${{ steps.find_version.outputs.version }} files: ${{ steps.find_filenames.outputs.package_filenames }} + gzip: false - - name: Delete any previous tag/release named "latest" - uses: dev-drprasad/delete-tag-and-release@v0.1.3 - with: - delete_release: true # default: false - tag_name: latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# - name: Delete any previous tag/release named "latest" +# uses: dev-drprasad/delete-tag-and-release@v0.1.3 +# with: +# delete_release: true # default: false +# tag_name: latest +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Rename assets id: rename_files @@ -318,8 +319,10 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} tag: latest + allow_override: true name: Filesystem Layer latest release body: > This is a moving release that always points to the latest release. It allows you to easily download the assets. files: ${{ steps.rename_files.outputs.package_filenames }} + gzip: false From 39edaa92e189ebaafaf22e3ebd6ca86923bfcfae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 5 Mar 2021 12:11:21 +0100 Subject: [PATCH 31/36] make separate step for latest release --- .../build-test-release-client-packages.yml | 44 +++++++++++++------ 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 3aff6d3e..e5aaf848 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -299,30 +299,46 @@ jobs: files: ${{ steps.find_filenames.outputs.package_filenames }} gzip: false -# - name: Delete any previous tag/release named "latest" -# uses: dev-drprasad/delete-tag-and-release@v0.1.3 -# with: -# delete_release: true # default: false -# tag_name: latest -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Rename assets - id: rename_files + release-latest: + needs: [release] # only run when the previous step (the actual release) was successful + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - uses: actions/download-artifact@v2 + with: + path: ./build_artifacts + + - name: Find filenames of downloaded packages and rename them to latest + id: find_filenames + shell: bash run: | sudo apt-get install rename - rename "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" ${{ steps.find_filenames.outputs.package_filenames }} + rename "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" $(find ./build_artifacts -name cvmfs-config-eessi*) ls -1 -R ./build_artifacts echo ::set-output name=package_filenames::$(find ./build_artifacts -name cvmfs-config-eessi*latest*) + - name: Delete any previous tag/release named "latest" + uses: dev-drprasad/delete-tag-and-release@v0.1.3 + with: + delete_release: true # default: false + tag_name: latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: meeDamian/github-release@2.0 with: token: ${{ secrets.GITHUB_TOKEN }} tag: latest - allow_override: true name: Filesystem Layer latest release body: > This is a moving release that always points to the latest release. - It allows you to easily download the assets. - files: ${{ steps.rename_files.outputs.package_filenames }} + It allows you to easily download the latest version of the assets using, for instance: + https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi_latest_all.deb + https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi-latest-1.noarch.rpm + https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi-latest.pkg + https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi-latest.tar + files: ${{ steps.find_filenames.outputs.package_filenames }} gzip: false From ff8e9710d728a2f14d3021829c0551169974b552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 5 Mar 2021 12:39:29 +0100 Subject: [PATCH 32/36] improve description of latest release --- .../build-test-release-client-packages.yml | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index e5aaf848..a98c2ba8 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -311,6 +311,11 @@ jobs: with: path: ./build_artifacts + - name: Find release version in tag + id: find_version + run: | + echo ::set-output name=version::${GITHUB_REF#refs/tags/} + - name: Find filenames of downloaded packages and rename them to latest id: find_filenames shell: bash @@ -334,11 +339,16 @@ jobs: tag: latest name: Filesystem Layer latest release body: > - This is a moving release that always points to the latest release. + Filesystem Layer release ${{ steps.find_version.outputs.version }} + + This is a moving release that always contains the assets (the `cvmfs-config-eessi-*` packages) of the latest release. It allows you to easily download the latest version of the assets using, for instance: - https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi_latest_all.deb - https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi-latest-1.noarch.rpm - https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi-latest.pkg - https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi-latest.tar + + - https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi_latest_all.deb + - https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi-latest.noarch.rpm + - https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi-latest.pkg + - https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi-latest.tar + + Current version: https://github.com/${{github.repository}}/releases/tag/${{ steps.find_version.outputs.version }} files: ${{ steps.find_filenames.outputs.package_filenames }} gzip: false From 311b1918fe328061302fb11f4f8e79ca9fc707dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 5 Mar 2021 12:55:06 +0100 Subject: [PATCH 33/36] update macos cvmfs package, improve description of latest release --- .github/workflows/build-test-release-client-packages.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index a98c2ba8..be09c0e2 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -239,7 +239,7 @@ jobs: run: brew install --cask osxfuse - name: Download and install CVMFS client - run: wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-2.7.5/cvmfs-2.7.5.pkg && sudo installer -target / -pkg cvmfs-2.7.5.pkg + run: wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-latest.pkg && sudo installer -target / -pkg cvmfs-latest.pkg - name: Download cvmfs-config-eessi package uses: actions/download-artifact@v2 @@ -338,8 +338,8 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} tag: latest name: Filesystem Layer latest release - body: > - Filesystem Layer release ${{ steps.find_version.outputs.version }} + body: | + Filesystem Layer release ${{ steps.find_version.outputs.version }} (see: https://github.com/${{github.repository}}/releases/tag/${{ steps.find_version.outputs.version }}) This is a moving release that always contains the assets (the `cvmfs-config-eessi-*` packages) of the latest release. It allows you to easily download the latest version of the assets using, for instance: @@ -349,6 +349,5 @@ jobs: - https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi-latest.pkg - https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi-latest.tar - Current version: https://github.com/${{github.repository}}/releases/tag/${{ steps.find_version.outputs.version }} files: ${{ steps.find_filenames.outputs.package_filenames }} gzip: false From 5367e6329e3754a6402c444839ea66c72b8e06cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 5 Mar 2021 13:10:31 +0100 Subject: [PATCH 34/36] use macfuse --- .github/workflows/build-test-release-client-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index be09c0e2..2262ddc4 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -236,7 +236,7 @@ jobs: runs-on: macos-latest steps: - name: Install OSXFUSE - run: brew install --cask osxfuse + run: brew install --cask macfuse - name: Download and install CVMFS client run: wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-latest.pkg && sudo installer -target / -pkg cvmfs-latest.pkg From c64cbf77299ad0c9b5c96c2e96710587cdd18678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 5 Mar 2021 14:06:38 +0100 Subject: [PATCH 35/36] clean up --- .github/workflows/build-test-release-client-packages.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 2262ddc4..342a0de7 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -2,8 +2,8 @@ name: Build, test, and release client packages on: push: -# branches: -# - main + branches: + - main tags: - 'v*' pull_request: @@ -43,21 +43,18 @@ jobs: # it will make debugging more annoying. - name: Build RPM package - id: build-rpm uses: bpicode/github-action-fpm@master with: fpm_args: "etc" fpm_opts: "--debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t rpm -a all -s dir -C ./package --description 'CVMFS configuration package for EESSI.'" - name: Build Deb package - id: build-deb uses: bpicode/github-action-fpm@master with: fpm_args: "etc" fpm_opts: "--debug -n cvmfs-config-eessi -v ${{ steps.get_version.outputs.version }} -t deb -a all -s dir -C ./package --description 'CVMFS configuration package for EESSI.'" - name: Build tar package - id: build-tar uses: bpicode/github-action-fpm@master with: fpm_args: "etc" From 6225abcc16907d498a626bd0b7353967b2a73b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 5 Mar 2021 14:27:36 +0100 Subject: [PATCH 36/36] remove urls from release description --- .github/workflows/build-test-release-client-packages.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/build-test-release-client-packages.yml b/.github/workflows/build-test-release-client-packages.yml index 342a0de7..5020ee43 100644 --- a/.github/workflows/build-test-release-client-packages.yml +++ b/.github/workflows/build-test-release-client-packages.yml @@ -338,13 +338,6 @@ jobs: body: | Filesystem Layer release ${{ steps.find_version.outputs.version }} (see: https://github.com/${{github.repository}}/releases/tag/${{ steps.find_version.outputs.version }}) - This is a moving release that always contains the assets (the `cvmfs-config-eessi-*` packages) of the latest release. - It allows you to easily download the latest version of the assets using, for instance: - - - https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi_latest_all.deb - - https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi-latest.noarch.rpm - - https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi-latest.pkg - - https://github.com/${{github.repository}}/releases/download/latest/cvmfs-config-eessi-latest.tar - + This `latest` tag is a moving tag that is updated automatically for each release, and provides easy access to the latest `cvmfs-config-eessi` packages. files: ${{ steps.find_filenames.outputs.package_filenames }} gzip: false