1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-28 15:56:28 +00:00

ci: Generate release sha256 sums (#649)

This commit is contained in:
marblenix 2019-11-25 10:01:01 -06:00 committed by Matan Kushner
parent 57f6ea4fc1
commit c098ae65c3

View File

@ -166,10 +166,10 @@ jobs:
env: env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
# Create GitHub release with Rust build targets and release notes # Build sources for every OS
github_release: github_build:
if: startsWith(github.ref, 'refs/tags/v') if: startsWith(github.ref, 'refs/tags/v')
name: Create GitHub Release name: Build release binaries
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -229,8 +229,47 @@ jobs:
tar czvf ../../../${{ matrix.name }} starship tar czvf ../../../${{ matrix.name }} starship
cd - cd -
- name: Upload build artifact
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.name }}
path: ${{ matrix.name }}
# Create GitHub release with Rust build targets and release notes
github_release:
if: startsWith(github.ref, 'refs/tags/v')
name: Create GitHub Release
needs: github_build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
# These can be squashed when https://github.com/actions/download-artifact/issues/6 is closed
- name: Download releases from github_build
uses: actions/download-artifact@v1
with:
name: starship-x86_64-unknown-linux-gnu.tar.gz
path: .
- name: Download releases from github_build
uses: actions/download-artifact@v1
with:
name: starship-x86_64-unknown-linux-musl.tar.gz
path: .
- name: Download releases from github_build
uses: actions/download-artifact@v1
with:
name: starship-x86_64-apple-darwin.tar.gz
path: .
- name: Download releases from github_build
uses: actions/download-artifact@v1
with:
name: starship-x86_64-pc-windows-msvc.zip
path: .
- name: Generate checksums
run: for file in starship-*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
- name: Generate release notes - name: Generate release notes
if: matrix.os == 'ubuntu-latest'
run: | run: |
# Temporary fix for https://github.com/actions/setup-go/issues/14 # Temporary fix for https://github.com/actions/setup-go/issues/14
export PATH=$PATH:$(go env GOPATH)/bin export PATH=$PATH:$(go env GOPATH)/bin
@ -240,7 +279,15 @@ jobs:
- name: Create GitHub release ${{ matrix.target }} - name: Create GitHub release ${{ matrix.target }}
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
files: ${{ matrix.name }} files: |
starship-x86_64-unknown-linux-gnu.tar.gz
starship-x86_64-unknown-linux-gnu.tar.gz.sha256
starship-x86_64-unknown-linux-musl.tar.gz
starship-x86_64-unknown-linux-musl.tar.gz.sha256
starship-x86_64-apple-darwin.tar.gz
starship-x86_64-apple-darwin.tar.gz.sha256
starship-x86_64-pc-windows-msvc.zip
starship-x86_64-pc-windows-msvc.zip.sha256
body_path: RELEASE.md body_path: RELEASE.md
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}