From 254a08ec19875564cc8149b2713e2e6f34844330 Mon Sep 17 00:00:00 2001 From: LKedward Date: Wed, 18 Nov 2020 15:44:19 +0000 Subject: Move release workflow into existing CI to reuse build/test workflow --- .github/workflows/CI.yml | 50 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) (limited to '.github/workflows/CI.yml') diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 03fcf84..22aa6e5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,6 +1,6 @@ name: CI -on: [push, pull_request] +on: [push, pull_request, release] env: CI: "ON" # We can detect this in the build system and other vendors implement it @@ -23,16 +23,22 @@ jobs: - os: ubuntu-latest STACK_CACHE: "/home/runner/.stack/" STACK_CACHE_VERSION: "" + BOOTSTRAP_FILE: "/home/runner/.local/bin/fpm" + XSUFFIX: "" - os: macos-latest STACK_CACHE: | /Users/runner/.stack/snapshots /Users/runner/.stack/setup-exe-src STACK_CACHE_VERSION: "v2" + BOOTSTRAP_FILE: "/Users/runner/.local/bin/fpm" + XSUFFIX: "" - os: windows-latest STACK_CACHE: | C:\Users\runneradmin\AppData\Roaming\stack C:\Users\runneradmin\AppData\Local\Programs\stack STACK_CACHE_VERSION: "v2" + BOOTSTRAP_FILE: C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe + XSUFFIX: ".exe" env: FC: gfortran @@ -104,3 +110,45 @@ jobs: if: contains(matrix.os, 'windows') run: | ci\run_tests.bat + + # ----- Upload binaries if creating a release ----- + - name: Check that fpm --version matches release tag + if: github.event_name == 'release' && contains(matrix.os, 'ubuntu') + run: | + cd fpm + fpm run -- "--version" | grep $(echo ${{ github.ref }} | cut -d/ -f3) + + - name: Stage file for upload (Linux / macOS) + if: github.event_name == 'release' && (contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')) + run: | + cd fpm + fpm run --runner cp -- fpm-${{ matrix.os }}-x86_64-debug + + - name: Stage file for upload (Windows) + if: github.event_name == 'release' && contains(matrix.os, 'windows') + shell: cmd + run: | + cd fpm + fpm run --runner copy -- fpm-${{ matrix.os }}-x86_64-debug + + - name: Upload dev trunk binary release + if: github.event_name == 'release' + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: fpm/fpm-${{ matrix.os }}-x86_64-debug + asset_name: fpm-${{ matrix.os }}-x86_64-debug${{ matrix.XSUFFIX }} + tag: ${{ github.ref }} + overwrite: true + prerelease: true + + - name: Upload dev trunk binary release (bootstrap fpm) + if: github.event_name == 'release' + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ matrix.BOOTSTRAP_FILE }} + asset_name: fpm-bootstrap-${{ matrix.os }}-x86_64-debug${{ matrix.XSUFFIX }} + tag: ${{ github.ref }} + overwrite: true + prerelease: true \ No newline at end of file -- cgit v1.2.3 From e34b4ce8a0e1c49fd286b819e10025e7c918fce1 Mon Sep 17 00:00:00 2001 From: LKedward Date: Wed, 18 Nov 2020 15:59:27 +0000 Subject: Compile release binaries statically --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows/CI.yml') diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 22aa6e5..9106fe2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -122,14 +122,14 @@ jobs: if: github.event_name == 'release' && (contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')) run: | cd fpm - fpm run --runner cp -- fpm-${{ matrix.os }}-x86_64-debug + fpm run --flag --static --runner cp -- fpm-${{ matrix.os }}-x86_64-debug - name: Stage file for upload (Windows) if: github.event_name == 'release' && contains(matrix.os, 'windows') shell: cmd run: | cd fpm - fpm run --runner copy -- fpm-${{ matrix.os }}-x86_64-debug + fpm run --flag --static --runner copy -- fpm-${{ matrix.os }}-x86_64-debug - name: Upload dev trunk binary release if: github.event_name == 'release' -- cgit v1.2.3 From 026f1f634803f1d081f6c06eafdc7ccc8556d1fd Mon Sep 17 00:00:00 2001 From: LKedward Date: Wed, 18 Nov 2020 16:26:04 +0000 Subject: Update: binary release CI --- .github/workflows/CI.yml | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to '.github/workflows/CI.yml') diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9106fe2..0191b37 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -25,6 +25,7 @@ jobs: STACK_CACHE_VERSION: "" BOOTSTRAP_FILE: "/home/runner/.local/bin/fpm" XSUFFIX: "" + RELEASE_CMD: "fpm run --flag --static --runner cp" - os: macos-latest STACK_CACHE: | /Users/runner/.stack/snapshots @@ -32,6 +33,7 @@ jobs: STACK_CACHE_VERSION: "v2" BOOTSTRAP_FILE: "/Users/runner/.local/bin/fpm" XSUFFIX: "" + RELEASE_CMD: "fpm run --runner cp" - os: windows-latest STACK_CACHE: | C:\Users\runneradmin\AppData\Roaming\stack @@ -39,6 +41,7 @@ jobs: STACK_CACHE_VERSION: "v2" BOOTSTRAP_FILE: C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe XSUFFIX: ".exe" + RELEASE_CMD: "fpm run --flag --static --runner copy" env: FC: gfortran @@ -118,20 +121,14 @@ jobs: cd fpm fpm run -- "--version" | grep $(echo ${{ github.ref }} | cut -d/ -f3) - - name: Stage file for upload (Linux / macOS) + - name: Stage release files for upload if: github.event_name == 'release' && (contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')) run: | cd fpm - fpm run --flag --static --runner cp -- fpm-${{ matrix.os }}-x86_64-debug - - - name: Stage file for upload (Windows) - if: github.event_name == 'release' && contains(matrix.os, 'windows') - shell: cmd - run: | - cd fpm - fpm run --flag --static --runner copy -- fpm-${{ matrix.os }}-x86_64-debug + ${{ matrix.RELEASE_CMD }} -- fpm-${{ matrix.os }}-x86_64-debug + ${{ matrix.RELEASE_CMD }} --release -- fpm-${{ matrix.os }}-x86_64-release - - name: Upload dev trunk binary release + - name: Upload debug binary if: github.event_name == 'release' uses: svenstaro/upload-release-action@v2 with: @@ -141,8 +138,19 @@ jobs: tag: ${{ github.ref }} overwrite: true prerelease: true - - - name: Upload dev trunk binary release (bootstrap fpm) + + - name: Upload release binary + if: github.event_name == 'release' + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: fpm/fpm-${{ matrix.os }}-x86_64-release + asset_name: fpm-${{ matrix.os }}-x86_64-release${{ matrix.XSUFFIX }} + tag: ${{ github.ref }} + overwrite: true + prerelease: true + + - name: Upload bootstrap fpm binary if: github.event_name == 'release' uses: svenstaro/upload-release-action@v2 with: -- cgit v1.2.3 From 302d54a4f7ecdd2d2c9e0f1cb445efca7424bc22 Mon Sep 17 00:00:00 2001 From: LKedward Date: Thu, 19 Nov 2020 10:13:13 +0000 Subject: Fix compile flags for release binaries --- .github/workflows/CI.yml | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to '.github/workflows/CI.yml') diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0191b37..eb0e9db 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -25,7 +25,7 @@ jobs: STACK_CACHE_VERSION: "" BOOTSTRAP_FILE: "/home/runner/.local/bin/fpm" XSUFFIX: "" - RELEASE_CMD: "fpm run --flag --static --runner cp" + RELEASE_CMD: "fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner cp" - os: macos-latest STACK_CACHE: | /Users/runner/.stack/snapshots @@ -33,7 +33,7 @@ jobs: STACK_CACHE_VERSION: "v2" BOOTSTRAP_FILE: "/Users/runner/.local/bin/fpm" XSUFFIX: "" - RELEASE_CMD: "fpm run --runner cp" + RELEASE_CMD: "fpm run --flag -g --flag -fbacktrace --flag -O3 --runner cp" - os: windows-latest STACK_CACHE: | C:\Users\runneradmin\AppData\Roaming\stack @@ -41,7 +41,7 @@ jobs: STACK_CACHE_VERSION: "v2" BOOTSTRAP_FILE: C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe XSUFFIX: ".exe" - RELEASE_CMD: "fpm run --flag --static --runner copy" + RELEASE_CMD: "fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner copy" env: FC: gfortran @@ -122,30 +122,18 @@ jobs: fpm run -- "--version" | grep $(echo ${{ github.ref }} | cut -d/ -f3) - name: Stage release files for upload - if: github.event_name == 'release' && (contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')) + if: github.event_name == 'release' run: | cd fpm - ${{ matrix.RELEASE_CMD }} -- fpm-${{ matrix.os }}-x86_64-debug - ${{ matrix.RELEASE_CMD }} --release -- fpm-${{ matrix.os }}-x86_64-release + ${{ matrix.RELEASE_CMD }} -- fpm-${{ matrix.os }}-x86_64 - name: Upload debug binary if: github.event_name == 'release' uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: fpm/fpm-${{ matrix.os }}-x86_64-debug - asset_name: fpm-${{ matrix.os }}-x86_64-debug${{ matrix.XSUFFIX }} - tag: ${{ github.ref }} - overwrite: true - prerelease: true - - - name: Upload release binary - if: github.event_name == 'release' - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: fpm/fpm-${{ matrix.os }}-x86_64-release - asset_name: fpm-${{ matrix.os }}-x86_64-release${{ matrix.XSUFFIX }} + file: fpm/fpm-${{ matrix.os }}-x86_64 + asset_name: fpm-${{ matrix.os }}-x86_64${{ matrix.XSUFFIX }} tag: ${{ github.ref }} overwrite: true prerelease: true @@ -156,7 +144,7 @@ jobs: with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: ${{ matrix.BOOTSTRAP_FILE }} - asset_name: fpm-bootstrap-${{ matrix.os }}-x86_64-debug${{ matrix.XSUFFIX }} + asset_name: fpm-bootstrap-${{ matrix.os }}-x86_64${{ matrix.XSUFFIX }} tag: ${{ github.ref }} overwrite: true prerelease: true \ No newline at end of file -- cgit v1.2.3 From bfe258e7c36c46dcc829aa5e30971b22e715943a Mon Sep 17 00:00:00 2001 From: LKedward Date: Thu, 19 Nov 2020 12:06:12 +0000 Subject: Restrict github actions release triggers --- .github/workflows/CI.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to '.github/workflows/CI.yml') diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index eb0e9db..a65bad2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,6 +1,10 @@ name: CI -on: [push, pull_request, release] +on: + push: + pull_request: + release: + types: [published] env: CI: "ON" # We can detect this in the build system and other vendors implement it @@ -119,7 +123,7 @@ jobs: if: github.event_name == 'release' && contains(matrix.os, 'ubuntu') run: | cd fpm - fpm run -- "--version" | grep $(echo ${{ github.ref }} | cut -d/ -f3) + fpm run -- "--version" | grep $(echo ${{ github.ref }} | cut -dv -f2) - name: Stage release files for upload if: github.event_name == 'release' @@ -127,7 +131,7 @@ jobs: cd fpm ${{ matrix.RELEASE_CMD }} -- fpm-${{ matrix.os }}-x86_64 - - name: Upload debug binary + - name: Upload fpm binary if: github.event_name == 'release' uses: svenstaro/upload-release-action@v2 with: -- cgit v1.2.3 From 87e1db5045b0f58a7207ea040770da53548d3ba1 Mon Sep 17 00:00:00 2001 From: LKedward Date: Thu, 19 Nov 2020 14:33:17 +0000 Subject: Check release version on all platforms --- .github/workflows/CI.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to '.github/workflows/CI.yml') diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a65bad2..d57e02a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -29,6 +29,7 @@ jobs: STACK_CACHE_VERSION: "" BOOTSTRAP_FILE: "/home/runner/.local/bin/fpm" XSUFFIX: "" + CHECK_VERSION_CMD: grep $(echo ${{ github.ref }} | cut -dv -f2) RELEASE_CMD: "fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner cp" - os: macos-latest STACK_CACHE: | @@ -37,6 +38,7 @@ jobs: STACK_CACHE_VERSION: "v2" BOOTSTRAP_FILE: "/Users/runner/.local/bin/fpm" XSUFFIX: "" + CHECK_VERSION_CMD: grep $(echo ${{ github.ref }} | cut -dv -f2) RELEASE_CMD: "fpm run --flag -g --flag -fbacktrace --flag -O3 --runner cp" - os: windows-latest STACK_CACHE: | @@ -45,6 +47,7 @@ jobs: STACK_CACHE_VERSION: "v2" BOOTSTRAP_FILE: C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe XSUFFIX: ".exe" + CHECK_VERSION_CMD: Select-String -Pattern Version | Where-Object { if ($_ -like -join("*",("${{ github.ref }}" -Split "v")[1],"*")) {echo $_} else {Throw} } RELEASE_CMD: "fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner copy" env: @@ -120,10 +123,10 @@ jobs: # ----- Upload binaries if creating a release ----- - name: Check that fpm --version matches release tag - if: github.event_name == 'release' && contains(matrix.os, 'ubuntu') + if: github.event_name == 'release' run: | cd fpm - fpm run -- "--version" | grep $(echo ${{ github.ref }} | cut -dv -f2) + fpm run -- "--version" | ${{ matrix.CHECK_VERSION_CMD }} - name: Stage release files for upload if: github.event_name == 'release' -- cgit v1.2.3 From 08864fb757a22d7a03af57ef1f23d2b68f2cbf52 Mon Sep 17 00:00:00 2001 From: LKedward Date: Fri, 20 Nov 2020 16:09:22 +0000 Subject: Update: naming of binary releases --- .github/workflows/CI.yml | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) (limited to '.github/workflows/CI.yml') diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d57e02a..6897675 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -29,8 +29,9 @@ jobs: STACK_CACHE_VERSION: "" BOOTSTRAP_FILE: "/home/runner/.local/bin/fpm" XSUFFIX: "" - CHECK_VERSION_CMD: grep $(echo ${{ github.ref }} | cut -dv -f2) - RELEASE_CMD: "fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner cp" + GET_VERSION_CMD: echo ${{ github.ref }} | cut -dv -f2 + CHECK_VERSION_CMD: grep $(cat fpm_version) + RELEASE_CMD: "fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner cp -- fpm-v$(cat fpm_version)-linux-x86_64" - os: macos-latest STACK_CACHE: | /Users/runner/.stack/snapshots @@ -38,8 +39,9 @@ jobs: STACK_CACHE_VERSION: "v2" BOOTSTRAP_FILE: "/Users/runner/.local/bin/fpm" XSUFFIX: "" - CHECK_VERSION_CMD: grep $(echo ${{ github.ref }} | cut -dv -f2) - RELEASE_CMD: "fpm run --flag -g --flag -fbacktrace --flag -O3 --runner cp" + GET_VERSION_CMD: echo ${{ github.ref }} | cut -dv -f2 + CHECK_VERSION_CMD: grep $(cat fpm_version) + RELEASE_CMD: "fpm run --flag -g --flag -fbacktrace --flag -O3 --runner cp -- fpm-v$(cat fpm_version)-macos-x86_64" - os: windows-latest STACK_CACHE: | C:\Users\runneradmin\AppData\Roaming\stack @@ -47,8 +49,9 @@ jobs: STACK_CACHE_VERSION: "v2" BOOTSTRAP_FILE: C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe XSUFFIX: ".exe" - CHECK_VERSION_CMD: Select-String -Pattern Version | Where-Object { if ($_ -like -join("*",("${{ github.ref }}" -Split "v")[1],"*")) {echo $_} else {Throw} } - RELEASE_CMD: "fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner copy" + GET_VERSION_CMD: ("${{ github.ref }}" -Split "v")[1] + CHECK_VERSION_CMD: Select-String -Pattern Version | Where-Object { if ($_ -like -join("*",(Get-Content fpm_version),"*")) {echo $_} else {Throw} } + RELEASE_CMD: fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner copy -- (-join("fpm-v",(Get-Content fpm_version),"-windows-x86_64.exe")) env: FC: gfortran @@ -126,32 +129,36 @@ jobs: if: github.event_name == 'release' run: | cd fpm + ${{ matrix.GET_VERSION_CMD }} > fpm_version fpm run -- "--version" | ${{ matrix.CHECK_VERSION_CMD }} - name: Stage release files for upload if: github.event_name == 'release' run: | cd fpm - ${{ matrix.RELEASE_CMD }} -- fpm-${{ matrix.os }}-x86_64 + ${{ matrix.RELEASE_CMD }} + + - name: Make executable + if: github.event_name == 'release' && (contains(matrix.os, 'linux') || contains(matrix.os, 'macos')) + run: chmod u+x fpm/fpm-v* - name: Upload fpm binary if: github.event_name == 'release' uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: fpm/fpm-${{ matrix.os }}-x86_64 - asset_name: fpm-${{ matrix.os }}-x86_64${{ matrix.XSUFFIX }} + file: fpm/fpm-v* + file_glob: true tag: ${{ github.ref }} overwrite: true - prerelease: true - - name: Upload bootstrap fpm binary - if: github.event_name == 'release' - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ matrix.BOOTSTRAP_FILE }} - asset_name: fpm-bootstrap-${{ matrix.os }}-x86_64${{ matrix.XSUFFIX }} - tag: ${{ github.ref }} - overwrite: true - prerelease: true \ No newline at end of file + # - name: Upload bootstrap fpm binary + # if: github.event_name == 'release' + # uses: svenstaro/upload-release-action@v2 + # with: + # repo_token: ${{ secrets.GITHUB_TOKEN }} + # file: ${{ matrix.BOOTSTRAP_FILE }} + # asset_name: fpm-bootstrap-${{ matrix.os }}-x86_64${{ matrix.XSUFFIX }} + # tag: ${{ github.ref }} + # overwrite: true + # prerelease: true \ No newline at end of file -- cgit v1.2.3 From 09de7d3d362f0e054499c939fb07e96cccfbeef3 Mon Sep 17 00:00:00 2001 From: LKedward Date: Fri, 20 Nov 2020 16:57:00 +0000 Subject: Update: naming of bootstrap binary release --- .github/workflows/CI.yml | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to '.github/workflows/CI.yml') diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6897675..da8f683 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -27,31 +27,28 @@ jobs: - os: ubuntu-latest STACK_CACHE: "/home/runner/.stack/" STACK_CACHE_VERSION: "" - BOOTSTRAP_FILE: "/home/runner/.local/bin/fpm" - XSUFFIX: "" GET_VERSION_CMD: echo ${{ github.ref }} | cut -dv -f2 CHECK_VERSION_CMD: grep $(cat fpm_version) RELEASE_CMD: "fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner cp -- fpm-v$(cat fpm_version)-linux-x86_64" + BOOTSTRAP_RELEASE_CMD: cp /home/runner/.local/bin/fpm fpm-bootstrap-v$(cat fpm_version)-linux-x86_64 - os: macos-latest STACK_CACHE: | /Users/runner/.stack/snapshots /Users/runner/.stack/setup-exe-src STACK_CACHE_VERSION: "v2" - BOOTSTRAP_FILE: "/Users/runner/.local/bin/fpm" - XSUFFIX: "" GET_VERSION_CMD: echo ${{ github.ref }} | cut -dv -f2 CHECK_VERSION_CMD: grep $(cat fpm_version) RELEASE_CMD: "fpm run --flag -g --flag -fbacktrace --flag -O3 --runner cp -- fpm-v$(cat fpm_version)-macos-x86_64" + BOOTSTRAP_RELEASE_CMD: cp /Users/runner/.local/bin/fpm fpm-bootstrap-v$(cat fpm_version)-macos-x86_64 - os: windows-latest STACK_CACHE: | C:\Users\runneradmin\AppData\Roaming\stack C:\Users\runneradmin\AppData\Local\Programs\stack STACK_CACHE_VERSION: "v2" - BOOTSTRAP_FILE: C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe - XSUFFIX: ".exe" GET_VERSION_CMD: ("${{ github.ref }}" -Split "v")[1] CHECK_VERSION_CMD: Select-String -Pattern Version | Where-Object { if ($_ -like -join("*",(Get-Content fpm_version),"*")) {echo $_} else {Throw} } RELEASE_CMD: fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner copy -- (-join("fpm-v",(Get-Content fpm_version),"-windows-x86_64.exe")) + BOOTSTRAP_RELEASE_CMD: copy C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe (-join("fpm-bootstrap-v",(Get-Content fpm_version),"-windows-x86_64.exe")) env: FC: gfortran @@ -137,9 +134,10 @@ jobs: run: | cd fpm ${{ matrix.RELEASE_CMD }} + ${{ matrix.BOOTSTRAP_RELEASE_CMD }} - name: Make executable - if: github.event_name == 'release' && (contains(matrix.os, 'linux') || contains(matrix.os, 'macos')) + if: github.event_name == 'release' && (contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')) run: chmod u+x fpm/fpm-v* - name: Upload fpm binary @@ -152,13 +150,12 @@ jobs: tag: ${{ github.ref }} overwrite: true - # - name: Upload bootstrap fpm binary - # if: github.event_name == 'release' - # uses: svenstaro/upload-release-action@v2 - # with: - # repo_token: ${{ secrets.GITHUB_TOKEN }} - # file: ${{ matrix.BOOTSTRAP_FILE }} - # asset_name: fpm-bootstrap-${{ matrix.os }}-x86_64${{ matrix.XSUFFIX }} - # tag: ${{ github.ref }} - # overwrite: true - # prerelease: true \ No newline at end of file + - name: Upload bootstrap fpm binary + if: github.event_name == 'release' + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: fpm/fpm-bootstrap-v* + file_glob: true + tag: ${{ github.ref }} + overwrite: true \ No newline at end of file -- cgit v1.2.3 From bf73a2a043b43d21c1f45131191a14287dfc3d0f Mon Sep 17 00:00:00 2001 From: LKedward Date: Fri, 20 Nov 2020 18:00:46 +0000 Subject: Add: hashes to binary releases --- .github/workflows/CI.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to '.github/workflows/CI.yml') diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index da8f683..20ff6ce 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -31,6 +31,8 @@ jobs: CHECK_VERSION_CMD: grep $(cat fpm_version) RELEASE_CMD: "fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner cp -- fpm-v$(cat fpm_version)-linux-x86_64" BOOTSTRAP_RELEASE_CMD: cp /home/runner/.local/bin/fpm fpm-bootstrap-v$(cat fpm_version)-linux-x86_64 + HASH_CMD: ls fpm-*|xargs -i{} sh -c 'sha256sum $1 > $1.sha256' -- {} + - os: macos-latest STACK_CACHE: | /Users/runner/.stack/snapshots @@ -40,6 +42,8 @@ jobs: CHECK_VERSION_CMD: grep $(cat fpm_version) RELEASE_CMD: "fpm run --flag -g --flag -fbacktrace --flag -O3 --runner cp -- fpm-v$(cat fpm_version)-macos-x86_64" BOOTSTRAP_RELEASE_CMD: cp /Users/runner/.local/bin/fpm fpm-bootstrap-v$(cat fpm_version)-macos-x86_64 + HASH_CMD: ls fpm-*|xargs -I{} sh -c 'shasum -a 256 $1 > $1.sha256' -- {} + - os: windows-latest STACK_CACHE: | C:\Users\runneradmin\AppData\Roaming\stack @@ -49,6 +53,7 @@ jobs: CHECK_VERSION_CMD: Select-String -Pattern Version | Where-Object { if ($_ -like -join("*",(Get-Content fpm_version),"*")) {echo $_} else {Throw} } RELEASE_CMD: fpm run --flag --static --flag -g --flag -fbacktrace --flag -O3 --runner copy -- (-join("fpm-v",(Get-Content fpm_version),"-windows-x86_64.exe")) BOOTSTRAP_RELEASE_CMD: copy C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe (-join("fpm-bootstrap-v",(Get-Content fpm_version),"-windows-x86_64.exe")) + HASH_CMD: Get-ChildItem -File -Filter "fpm-*" | Foreach-Object {echo (Get-FileHash -Algorithm SHA256 $PSItem | Select-Object hash | Format-Table -HideTableHeaders | Out-String) > (-join($PSItem,".sha256"))} env: FC: gfortran @@ -135,27 +140,18 @@ jobs: cd fpm ${{ matrix.RELEASE_CMD }} ${{ matrix.BOOTSTRAP_RELEASE_CMD }} + ${{ matrix.HASH_CMD }} - name: Make executable if: github.event_name == 'release' && (contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')) run: chmod u+x fpm/fpm-v* - - name: Upload fpm binary - if: github.event_name == 'release' - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: fpm/fpm-v* - file_glob: true - tag: ${{ github.ref }} - overwrite: true - - - name: Upload bootstrap fpm binary + - name: Upload assets if: github.event_name == 'release' uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: fpm/fpm-bootstrap-v* + file: fpm/fpm-* file_glob: true tag: ${{ github.ref }} overwrite: true \ No newline at end of file -- cgit v1.2.3 From 846d4e50fd5e9c6fe7538409d9f4ae3722d0eca7 Mon Sep 17 00:00:00 2001 From: LKedward Date: Sat, 21 Nov 2020 10:07:07 +0000 Subject: Update: README with executable permission text for binaries --- .github/workflows/CI.yml | 4 ---- 1 file changed, 4 deletions(-) (limited to '.github/workflows/CI.yml') diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 20ff6ce..8165ded 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -142,10 +142,6 @@ jobs: ${{ matrix.BOOTSTRAP_RELEASE_CMD }} ${{ matrix.HASH_CMD }} - - name: Make executable - if: github.event_name == 'release' && (contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')) - run: chmod u+x fpm/fpm-v* - - name: Upload assets if: github.event_name == 'release' uses: svenstaro/upload-release-action@v2 -- cgit v1.2.3