diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index daab6b96..eaece33d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,6 +4,8 @@ on: push: branches: - main + - stable + tags: "*.*.*" jobs: check: @@ -15,6 +17,11 @@ jobs: bun-version: latest - run: bun install - run: bun check + - if: github.ref_type == 'tag' + run: | + set -ex + [[ "$(jq -r .version package.json)" = "$GITHUB_REF_NAME" ]] + ! grep -i "to be released" CHANGES.md build-image: needs: [check] @@ -92,6 +99,31 @@ jobs: cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:build-cache,mode=max + release: + needs: [check] + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + - id: extract-changelog + uses: dahlia/submark@5a5ff0a58382fb812616a5801402f5aef00f90ce + with: + input-file: CHANGES.md + heading-level: 2 + heading-title-text: version ${{ github.ref_name }} + ignore-case: true + omit-heading: true + - run: 'cat "$CHANGES_FILE"' + env: + CHANGES_FILE: ${{ steps.extract-changelog.outputs.output-file }} + - if: github.event_name == 'push' && github.ref_type == 'tag' + uses: softprops/action-gh-release@v1 + with: + body_path: ${{ steps.extract-changelog.outputs.output-file }} + name: Hollo ${{ github.ref_name }} + generate_release_notes: false + publish-docs: if: | github.event_name == 'push' && diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 00000000..e2e95a12 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,7 @@ +Hollo changelog +=============== + +Version 0.1.0 +------------- + +Released on October 22, 2024. Initial release. diff --git a/docs/src/content/docs/install/manual.mdx b/docs/src/content/docs/install/manual.mdx index b29e8da6..44044e70 100644 --- a/docs/src/content/docs/install/manual.mdx +++ b/docs/src/content/docs/install/manual.mdx @@ -47,16 +47,11 @@ Installation import { Steps } from "@astrojs/starlight/components"; - - 1. Check out Hollo's latest code from [GitHub]: ~~~~ sh frame="none" - git clone https://github.com/dahlia/hollo.git + git clone -b stable https://github.com/dahlia/hollo.git cd hollo/ ~~~~ diff --git a/docs/src/content/docs/ja/install/manual.mdx b/docs/src/content/docs/ja/install/manual.mdx index c56acaae..063a1133 100644 --- a/docs/src/content/docs/ja/install/manual.mdx +++ b/docs/src/content/docs/ja/install/manual.mdx @@ -45,16 +45,11 @@ Holloは手動でインストールすることもできます。 import { Steps } from "@astrojs/starlight/components"; - - 1. Hollonの最新コードを[GitHub]から取得します: ~~~~ sh frame="none" - git clone https://github.com/dahlia/hollo.git + git clone -b stable https://github.com/dahlia/hollo.git cd hollo/ ~~~~ diff --git a/docs/src/content/docs/ko/install/manual.mdx b/docs/src/content/docs/ko/install/manual.mdx index 541f693c..25b6eacf 100644 --- a/docs/src/content/docs/ko/install/manual.mdx +++ b/docs/src/content/docs/ko/install/manual.mdx @@ -46,16 +46,11 @@ Hollo는 수동으로도 설치할 수 있습니다. import { Steps } from "@astrojs/starlight/components"; - - 1. Hollo의 최신 코드를 [GitHub] 저장소에서 받습니다: ~~~~ sh frame="none" - git clone https://github.com/dahlia/hollo.git + git clone -b stable https://github.com/dahlia/hollo.git cd hollo/ ~~~~ diff --git a/docs/src/content/docs/zh-cn/install/manual.mdx b/docs/src/content/docs/zh-cn/install/manual.mdx index ba04c2f6..6de1bd52 100644 --- a/docs/src/content/docs/zh-cn/install/manual.mdx +++ b/docs/src/content/docs/zh-cn/install/manual.mdx @@ -41,15 +41,11 @@ Hollo 可以手动安装在您的服务器上。本指南将引导您完成在 import { Steps } from "@astrojs/starlight/components"; - - 1. 从 [GitHub] 获取 Hollo 的最新代码: ~~~~ sh frame="none" - git clone https://github.com/dahlia/hollo.git + git clone -b stable https://github.com/dahlia/hollo.git cd hollo/ ~~~~