From 7e8dab4a1585bb1241a44c53eeae4acc25fe0661 Mon Sep 17 00:00:00 2001 From: Shohei Ueda <30958501+peaceiris@users.noreply.github.com> Date: Sun, 26 Jan 2020 20:31:36 +0900 Subject: [PATCH] ci: use github/hub install script [skip ci] https://github.com/github/hub/issues/2249 https://github.com/github/hub/pull/2453 https://github.com/actions/virtual-environments/issues/36 --- .github/workflows/release.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b516025..970feff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,17 +17,10 @@ jobs: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "${GITHUB_CONTEXT}" - - name: Install hub + - name: Install github/hub run: | - HUB_VERSION="2.13.0" - HUB_NAME="hub-linux-amd64-${HUB_VERSION}" - HUB_TARBALL="${HUB_NAME}.tgz" - wget -q "https://github.com/github/hub/releases/download/v${HUB_VERSION}/${HUB_TARBALL}" - tar -zxvf "./${HUB_TARBALL}" - mkdir ~/bin - cp "./${HUB_NAME}/bin/hub" ~/bin/ - echo "::add-path::~/bin/" - rm -rf "./${HUB_NAME}" "./${HUB_TARBALL}" + export HUB_VERSION="2.14.1" + curl -fsSL https://github.com/github/hub/raw/40e421edd2c63d57bb8daa4bb9bbdfa21e8becf9/script/get | bash -s "${HUB_VERSION}" - name: Create release env: @@ -35,8 +28,9 @@ jobs: run: | TAG_NAME="${GITHUB_REF##refs/tags/}" echo "See [CHANGELOG.md](https://github.com/${GITHUB_REPOSITORY}/blob/${TAG_NAME}/CHANGELOG.md) for more details." > ./release_notes.md - sed -i "1iRelease ${TAG_NAME}\n" ./release_notes.md - hub release create \ + RELEASE_NAME="$(jq -r '.name' ./package.json)" + sed -i "1i${RELEASE_NAME} ${TAG_NAME}\n" ./release_notes.md + ./bin/hub release create \ --draft \ --prerelease \ --file ./release_notes.md \