Upload SHA256 sums as artifacts

This commit is contained in:
klzgrad 2021-05-23 22:09:22 +08:00
parent b48a0cea73
commit 84c9a7cfdb

View File

@ -133,17 +133,21 @@ jobs:
- run: ccache -s
- run: ../tests/basic.sh out/Release/naive
- run: mkdir ${{ env.BUNDLE }} && cp out/Release/naive config.json ../LICENSE ../USAGE.txt ${{ env.BUNDLE }}
- run: tar cJf ${{ env.BUNDLE }}.tar.xz ${{ env.BUNDLE }}
- run: tar cJf ../${{ env.BUNDLE }}.tar.xz ${{ env.BUNDLE }}
- uses: actions/upload-release-asset@v1
if: ${{ github.event_name == 'release' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: src/${{ env.BUNDLE }}.tar.xz
asset_path: ${{ env.BUNDLE }}.tar.xz
asset_name: ${{ env.BUNDLE }}.tar.xz
asset_content_type: application/octet-stream
- run: openssl sha256 out/Release/naive
- run: openssl sha256 out/Release/naive >../${{ env.BUNDLE }}.sha256sum.txt
- uses: actions/upload-artifact@v2
with:
name: sha256sums
path: ${{ env.BUNDLE }}.sha256sum.txt
android:
needs: cache-toolchains-posix
runs-on: ubuntu-latest
@ -198,17 +202,21 @@ jobs:
# qemu-user segfaults with x64 or x86 android builds here.
if: ${{ matrix.arch != 'x64' && matrix.arch != 'x86' }}
- run: mkdir ${{ env.BUNDLE }} && cp out/Release/naive config.json ../LICENSE ../USAGE.txt ${{ env.BUNDLE }}
- run: tar cJf ${{ env.BUNDLE }}.tar.xz ${{ env.BUNDLE }}
- run: tar cJf ../${{ env.BUNDLE }}.tar.xz ${{ env.BUNDLE }}
- uses: actions/upload-release-asset@v1
if: ${{ github.event_name == 'release' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: src/${{ env.BUNDLE }}.tar.xz
asset_path: ${{ env.BUNDLE }}.tar.xz
asset_name: ${{ env.BUNDLE }}.tar.xz
asset_content_type: application/octet-stream
- run: openssl sha256 out/Release/naive
- run: openssl sha256 out/Release/naive >../${{ env.BUNDLE }}.sha256sum.txt
- uses: actions/upload-artifact@v2
with:
name: sha256sums
path: ${{ env.BUNDLE }}.sha256sum.txt
win:
needs: cache-toolchains-win
runs-on: windows-latest
@ -258,17 +266,21 @@ jobs:
# No real or emulated environment is available to test this.
if: ${{ matrix.arch != 'arm64' }}
- run: mkdir ${{ env.BUNDLE }} && cp out/Release/naive.exe config.json ../LICENSE ../USAGE.txt ${{ env.BUNDLE }}
- run: 7z a ${{ env.BUNDLE }}.zip ${{ env.BUNDLE }}
- run: 7z a ../${{ env.BUNDLE }}.zip ${{ env.BUNDLE }}
- uses: actions/upload-release-asset@v1
if: ${{ github.event_name == 'release' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: src/${{ env.BUNDLE }}.zip
asset_path: ${{ env.BUNDLE }}.zip
asset_name: ${{ env.BUNDLE }}.zip
asset_content_type: application/octet-stream
- run: openssl sha256 out/Release/naive.exe
- run: openssl sha256 out/Release/naive.exe >../${{ env.BUNDLE }}.sha256sum.txt
- uses: actions/upload-artifact@v2
with:
name: sha256sums
path: ${{ env.BUNDLE }}.sha256sum.txt
mac:
needs: cache-toolchains-mac
runs-on: macos-latest
@ -307,17 +319,21 @@ jobs:
# No real or emulated environment is available to test this.
if: ${{ matrix.arch != 'arm64' }}
- run: mkdir ${{ env.BUNDLE }} && cp out/Release/naive config.json ../LICENSE ../USAGE.txt ${{ env.BUNDLE }}
- run: tar cJf ${{ env.BUNDLE }}.tar.xz ${{ env.BUNDLE }}
- run: tar cJf ../${{ env.BUNDLE }}.tar.xz ${{ env.BUNDLE }}
- uses: actions/upload-release-asset@v1
if: ${{ github.event_name == 'release' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: src/${{ env.BUNDLE }}.tar.xz
asset_path: ${{ env.BUNDLE }}.tar.xz
asset_name: ${{ env.BUNDLE }}.tar.xz
asset_content_type: application/octet-stream
- run: openssl sha256 out/Release/naive
- run: openssl sha256 out/Release/naive >../${{ env.BUNDLE }}.sha256sum.txt
- uses: actions/upload-artifact@v2
with:
name: sha256sums
path: ${{ env.BUNDLE }}.sha256sum.txt
openwrt:
needs: cache-toolchains-posix
runs-on: ubuntu-latest
@ -427,14 +443,18 @@ jobs:
- run: ccache -s
- run: ../tests/basic.sh out/Release/naive
- run: mkdir ${{ env.BUNDLE }} && cp out/Release/naive config.json ../LICENSE ../USAGE.txt ${{ env.BUNDLE }}
- run: tar cJf ${{ env.BUNDLE }}.tar.xz ${{ env.BUNDLE }}
- run: tar cJf ../${{ env.BUNDLE }}.tar.xz ${{ env.BUNDLE }}
- uses: actions/upload-release-asset@v1
if: ${{ github.event_name == 'release' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: src/${{ env.BUNDLE }}.tar.xz
asset_path: ${{ env.BUNDLE }}.tar.xz
asset_name: ${{ env.BUNDLE }}.tar.xz
asset_content_type: application/octet-stream
- run: openssl sha256 out/Release/naive
- run: openssl sha256 out/Release/naive >../${{ env.BUNDLE }}.sha256sum.txt
- uses: actions/upload-artifact@v2
with:
name: sha256sums
path: ${{ env.BUNDLE }}.sha256sum.txt