Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/peaceiris/hugo-theme-iris.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeaceiris <30958501+peaceiris@users.noreply.github.com>2020-01-28 07:23:15 +0300
committerpeaceiris <30958501+peaceiris@users.noreply.github.com>2020-01-28 07:23:15 +0300
commitc1396f3fd9acf0bca6e41c3aadb452031a0f071b (patch)
tree5768dc566e3e8f713e1141f5b7e7d061ce784e3c /.github
parent9b06952abe5cb10d065a544867b8c9b4c64b726f (diff)
ci: Add release workflow
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/release.yml36
1 files changed, 36 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..0b33315b
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,36 @@
+name: Release
+
+on:
+ push:
+ tags:
+ - "v*.*.*"
+
+jobs:
+ release:
+ runs-on: ubuntu-18.04
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Dump GitHub context
+ env:
+ GITHUB_CONTEXT: ${{ toJson(github) }}
+ run: echo "${GITHUB_CONTEXT}"
+
+ - name: Install github/hub
+ run: |
+ 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
+ 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 \
+ "${TAG_NAME}"