Skip to content

Commit

Permalink
ci: use github/hub install script
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris authored Jan 26, 2020
1 parent 353aa9f commit a1f10a9
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,20 @@ 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:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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 \
Expand Down

0 comments on commit a1f10a9

Please sign in to comment.