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