mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-12-05 22:46:01 +01:00
ci: replace hub with gh for releases (#767)
This commit is contained in:
@@ -19,21 +19,16 @@ jobs:
|
|||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
run: echo "${GITHUB_CONTEXT}"
|
run: echo "${GITHUB_CONTEXT}"
|
||||||
|
|
||||||
- name: Install github/hub
|
|
||||||
run: |
|
|
||||||
export HUB_VERSION="2.14.2"
|
|
||||||
curl -fsSL https://github.com/github/hub/raw/8d91904208171b013f9a9d1175f4ab39068db047/script/get | bash -s "${HUB_VERSION}"
|
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
TAG_NAME="${GITHUB_REF##refs/tags/}"
|
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
|
echo "See [CHANGELOG.md](https://github.com/${GITHUB_REPOSITORY}/blob/${TAG_NAME}/CHANGELOG.md) for more details." > ./release_notes.md
|
||||||
RELEASE_NAME="$(jq -r '.name' ./package.json)"
|
RELEASE_NAME="$(jq -r '.name' ./package.json)"
|
||||||
sed -i "1i${RELEASE_NAME} ${TAG_NAME}\n" ./release_notes.md
|
gh release create \
|
||||||
./bin/hub release create \
|
|
||||||
--draft \
|
--draft \
|
||||||
--prerelease \
|
--prerelease \
|
||||||
--file ./release_notes.md \
|
--title "${RELEASE_NAME} ${TAG_NAME}" \
|
||||||
|
--notes-file ./release_notes.md \
|
||||||
"${TAG_NAME}"
|
"${TAG_NAME}"
|
||||||
|
|||||||
Reference in New Issue
Block a user