Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
CodeQL-Build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

jobs:
dependency-review:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/dependency-review-action@v4
8 changes: 4 additions & 4 deletions .github/workflows/dev-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ on:

jobs:
dev-image-test:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: make build
- run: make cirun cmd="npm ci"
- run: make cirun cmd="bun install"
# - run: make ciall
- run: make cirun cmd="npm run format:check"
- run: make cirun cmd="npm run lint"
- run: make cirun cmd="bun run format:check"
- run: make cirun cmd="bun run lint"
2 changes: 1 addition & 1 deletion .github/workflows/label-commenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
comment:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/purge-readme-image-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
purge:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:

- run: >
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
release:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand All @@ -16,21 +16,17 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }}
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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_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 \
NOTES="${RELEASE_NAME} ${TAG_NAME}

See [CHANGELOG.md](https://github.com/${GITHUB_REPOSITORY}/blob/${TAG_NAME}/CHANGELOG.md) for more details."
gh release create "${TAG_NAME}" \
--draft \
--prerelease \
--file ./release_notes.md \
"${TAG_NAME}"
--title "${RELEASE_NAME} ${TAG_NAME}" \
--notes "${NOTES}"
34 changes: 11 additions & 23 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,26 @@
name: Daily Test
name: Test Action

on:
schedule:
- cron: '13 13 * * *'
push:
branches: [main, feat/node24]
pull_request:
workflow_dispatch:

jobs:
test:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
matrix:
os:
- 'ubuntu-20.04'
- 'ubuntu-latest'
- 'macos-latest'
- 'windows-latest'
hugo-version:
- 'latest'
- '0.61.0'
extended:
- true
- false
hugo-version: ['latest', '0.160.1']
extended: [true, false]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3.0.0
uses: ./
with:
hugo-version: ${{ matrix.hugo-version }}
extended: ${{ matrix.extended }}

- name: Run hugo version
run: echo "::set-output name=hugo_version::$(hugo version)"
id: hugo_version

- name: '${{ steps.hugo_version.outputs.hugo_version }}'
run: echo '${{ steps.hugo_version.outputs.hugo_version }}'
- name: Verify Hugo
run: hugo version
59 changes: 38 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,56 @@ jobs:
fail-fast: false
matrix:
os:
- 'ubuntu-22.04'
- 'ubuntu-20.04'
- 'ubuntu-24.04'
- 'ubuntu-latest'
- 'macos-latest'
- 'windows-latest'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2

- run: npm ci
- run: bun install

- name: Run prettier
if: startsWith(matrix.os, 'ubuntu-22.04')
run: npm run format:check
if: startsWith(matrix.os, 'ubuntu-24.04')
run: bun run format:check

- name: Run eslint
if: startsWith(matrix.os, 'ubuntu-22.04')
run: npm run lint
if: startsWith(matrix.os, 'ubuntu-24.04')
run: bun run lint

- name: Run build
if: startsWith(matrix.os, 'ubuntu-24.04')
run: bun run build

- run: bun test --coverage --coverage-reporter=lcov --coverage-dir=coverage

- name: Run ncc
if: startsWith(matrix.os, 'ubuntu-22.04')
run: npm run build
- uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5

- run: npm test
test-action:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-latest'
- 'macos-latest'
- 'windows-latest'
hugo-version:
- 'latest'
- '0.139.0'
extended:
- true
- false
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Upload test coverage as artifact
uses: actions/upload-artifact@v4
- name: Setup Hugo
uses: ./
with:
name: coverage-${{ matrix.os }}
path: coverage
hugo-version: ${{ matrix.hugo-version }}
extended: ${{ matrix.extended }}

- uses: codecov/codecov-action@v5
- name: Verify Hugo
run: hugo version
2 changes: 1 addition & 1 deletion .github/workflows/update-major-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
update:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ coverage
.eslintcache
.env
node_modules
package-lock.json
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

24 changes: 10 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
ARG NODE_VERSION

FROM node:${NODE_VERSION}-buster-slim
FROM node:${NODE_VERSION}-bookworm-slim

SHELL ["/bin/bash", "-l", "-c"]

RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev autoconf \
ca-certificates \
wget && \
curl \
git \
unzip && \
rm -rf /var/lib/apt/lists/*

WORKDIR /git
ENV GIT_VERSION="2.28.0"
RUN wget -q "https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz" && \
tar -zxf "./v${GIT_VERSION}.tar.gz" && \
rm "./v${GIT_VERSION}.tar.gz" && \
cd "./git-${GIT_VERSION}" && \
make configure && \
./configure --prefix=/usr && \
make all && \
make install
ARG BUN_VERSION="1.3.12"
RUN curl -fsSL "https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64.zip" -o /tmp/bun.zip && \
unzip /tmp/bun.zip -d /tmp && \
mv /tmp/bun-linux-x64/bun /usr/local/bin/bun && \
chmod +x /usr/local/bin/bun && \
rm -rf /tmp/bun.zip /tmp/bun-linux-x64

WORKDIR /repo
ENV RUNNER_TEMP="/tmp"
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ cirun:

.PHONY: test
test:
$(DOCKER_RUN) npm test
$(DOCKER_RUN) bun test

.PHONY: all
all:
$(DOCKER_RUN) npm run all
$(DOCKER_RUN) bun run all

.PHONY: ciall
ciall:
$(DOCKER_RUN_CI) npm run all
$(DOCKER_RUN_CI) bun run all
2 changes: 1 addition & 1 deletion __tests__/data/brew.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"hugo","full_name":"hugo","tap":"homebrew/core","oldname":null,"aliases":[],"versioned_formulae":[],"desc":"Configurable static site generator","license":"Apache-2.0","homepage":"https://gohugo.io/","versions":{"stable":"0.83.1","head":"HEAD","bottle":true},"urls":{"stable":{"url":"https://github.com/gohugoio/hugo/archive/v0.83.1.tar.gz","tag":null,"revision":null}},"revision":0,"version_scheme":0,"bottle":{"stable":{"rebuild":0,"root_url":"https://ghcr.io/v2/homebrew/core","files":{"arm64_big_sur":{"cellar":":any_skip_relocation","url":"https://ghcr.io/v2/homebrew/core/hugo/blobs/sha256:f5997a1858e300787cd6e2e01ff8f87f0d3233f42af4becc040448ce06524d53","sha256":"f5997a1858e300787cd6e2e01ff8f87f0d3233f42af4becc040448ce06524d53"},"big_sur":{"cellar":":any_skip_relocation","url":"https://ghcr.io/v2/homebrew/core/hugo/blobs/sha256:32ad322954e9c2962849495c88c88e461d21a0a7d3bfa3aa4892ee34f569bf81","sha256":"32ad322954e9c2962849495c88c88e461d21a0a7d3bfa3aa4892ee34f569bf81"},"catalina":{"cellar":":any_skip_relocation","url":"https://ghcr.io/v2/homebrew/core/hugo/blobs/sha256:99078c665152420113fac08aaea7bdf2f8fe230696b724448bb9f2244cfdec55","sha256":"99078c665152420113fac08aaea7bdf2f8fe230696b724448bb9f2244cfdec55"},"mojave":{"cellar":":any_skip_relocation","url":"https://ghcr.io/v2/homebrew/core/hugo/blobs/sha256:a45ae895351a549639b40bdbb2a630e8a11ffb68d78a0aa7577faedce4c011d4","sha256":"a45ae895351a549639b40bdbb2a630e8a11ffb68d78a0aa7577faedce4c011d4"}}}},"keg_only":false,"bottle_disabled":false,"options":[],"build_dependencies":["go"],"dependencies":[],"recommended_dependencies":[],"optional_dependencies":[],"uses_from_macos":[],"requirements":[],"conflicts_with":[],"caveats":null,"installed":[],"linked_keg":null,"pinned":false,"outdated":false,"deprecated":false,"deprecation_date":null,"deprecation_reason":null,"disabled":false,"disable_date":null,"disable_reason":null,"analytics":{"install":{"30d":{"hugo":24137,"hugo --HEAD":16},"90d":{"hugo":61006,"hugo --HEAD":51},"365d":{"hugo":246915,"hugo --HEAD":273}},"install_on_request":{"30d":{"hugo":24100,"hugo --HEAD":16},"90d":{"hugo":60903,"hugo --HEAD":51},"365d":{"hugo":244317,"hugo --HEAD":266}},"build_error":{"30d":{"hugo":0}}},"generated_date":"2021-05-21"}
{"name":"hugo","full_name":"hugo","tap":"homebrew/core","oldname":null,"aliases":[],"versioned_formulae":[],"desc":"Configurable static site generator","license":"Apache-2.0","homepage":"https://gohugo.io/","versions":{"stable":"0.139.0","head":"HEAD","bottle":true},"urls":{"stable":{"url":"https://github.com/gohugoio/hugo/archive/v0.139.0.tar.gz","tag":null,"revision":null}},"revision":0,"version_scheme":0,"bottle":{"stable":{"rebuild":0,"root_url":"https://ghcr.io/v2/homebrew/core","files":{"arm64_big_sur":{"cellar":":any_skip_relocation","url":"https://ghcr.io/v2/homebrew/core/hugo/blobs/sha256:f5997a1858e300787cd6e2e01ff8f87f0d3233f42af4becc040448ce06524d53","sha256":"f5997a1858e300787cd6e2e01ff8f87f0d3233f42af4becc040448ce06524d53"},"big_sur":{"cellar":":any_skip_relocation","url":"https://ghcr.io/v2/homebrew/core/hugo/blobs/sha256:32ad322954e9c2962849495c88c88e461d21a0a7d3bfa3aa4892ee34f569bf81","sha256":"32ad322954e9c2962849495c88c88e461d21a0a7d3bfa3aa4892ee34f569bf81"},"catalina":{"cellar":":any_skip_relocation","url":"https://ghcr.io/v2/homebrew/core/hugo/blobs/sha256:99078c665152420113fac08aaea7bdf2f8fe230696b724448bb9f2244cfdec55","sha256":"99078c665152420113fac08aaea7bdf2f8fe230696b724448bb9f2244cfdec55"},"mojave":{"cellar":":any_skip_relocation","url":"https://ghcr.io/v2/homebrew/core/hugo/blobs/sha256:a45ae895351a549639b40bdbb2a630e8a11ffb68d78a0aa7577faedce4c011d4","sha256":"a45ae895351a549639b40bdbb2a630e8a11ffb68d78a0aa7577faedce4c011d4"}}}},"keg_only":false,"bottle_disabled":false,"options":[],"build_dependencies":["go"],"dependencies":[],"recommended_dependencies":[],"optional_dependencies":[],"uses_from_macos":[],"requirements":[],"conflicts_with":[],"caveats":null,"installed":[],"linked_keg":null,"pinned":false,"outdated":false,"deprecated":false,"deprecation_date":null,"deprecation_reason":null,"disabled":false,"disable_date":null,"disable_reason":null,"analytics":{"install":{"30d":{"hugo":24137,"hugo --HEAD":16},"90d":{"hugo":61006,"hugo --HEAD":51},"365d":{"hugo":246915,"hugo --HEAD":273}},"install_on_request":{"30d":{"hugo":24100,"hugo --HEAD":16},"90d":{"hugo":60903,"hugo --HEAD":51},"365d":{"hugo":244317,"hugo --HEAD":266}},"build_error":{"30d":{"hugo":0}}},"generated_date":"2021-05-21"}
Loading
Loading