Compare commits

..

15 Commits

Author SHA1 Message Date
dependabot[bot] 940247d08e ci: bump codecov/codecov-action from 6.0.1 to 7.0.0 (#707)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-08 13:21:59 +09:00
dependabot[bot] d17f2aa363 ci: bump github/codeql-action from 4.36.1 to 4.36.2 (#706)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-05 11:36:29 +09:00
dependabot[bot] c4a9c2db41 ci: bump github/codeql-action from 4.36.0 to 4.36.1 (#704)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-04 11:04:50 +09:00
dependabot[bot] 89ca553e6c ci: bump actions/checkout from 6.0.2 to 6.0.3 (#705)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-04 11:04:39 +09:00
dependabot[bot] 18deeac04c ci: bump github/codeql-action from 4.35.5 to 4.36.0 (#703)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-25 14:12:29 +09:00
dependabot[bot] 7845c37f7f ci: bump codecov/codecov-action from 6.0.0 to 6.0.1 (#702)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-19 22:14:18 +09:00
dependabot[bot] 8d04cd0510 ci: bump github/codeql-action from 4.35.4 to 4.35.5 (#701)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-18 11:59:53 +09:00
dependabot[bot] 9c46f58a58 ci: bump actions/dependency-review-action from 4.9.0 to 5.0.0 (#698)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-11 13:35:16 +09:00
dependabot[bot] 1f043ee545 ci: bump peaceiris/actions-hugo from 3.1.0 to 3.2.1 (#699)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-11 13:35:05 +09:00
dependabot[bot] 412dd9124a ci: bump codecov/codecov-action from 5.5.4 to 6.0.0 (#700)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-11 13:34:52 +09:00
peaceiris 4a3d6e00a5 chore(release): Remove build assets [skip ci] 2026-05-11 01:05:34 +09:00
peaceiris 2752ce1d29 chore(release): 3.2.1 2026-05-11 01:05:33 +09:00
peaceiris d8391e68b0 chore(release): Add build assets 2026-05-11 01:05:32 +09:00
Shohei Ueda 4e5bf412f0 fix: handle Hugo 0.139.5 archive fallback (#696)
Co-authored-by: Codex <noreply@openai.com>
2026-05-11 01:05:09 +09:00
peaceiris c2f9fa4376 chore(release): Remove build assets [skip ci] 2026-05-11 00:27:27 +09:00
15 changed files with 61 additions and 42541 deletions
+4 -4
View File
@@ -14,15 +14,15 @@ jobs:
contents: read
security-events: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Initialize CodeQL
uses: github/codeql-action/init@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
languages: javascript
- name: Autobuild
uses: github/codeql-action/autobuild@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
+2 -2
View File
@@ -13,5 +13,5 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
+1 -1
View File
@@ -28,7 +28,7 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- run: make build
- run: make cirun cmd="npm ci"
# - run: make ciall
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
contents: read
issues: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
ref: main
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Dump GitHub context
env:
+2 -2
View File
@@ -17,10 +17,10 @@ jobs:
hugo-version: ['latest', '0.160.1']
extended: [true, false]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Setup Hugo
uses: peaceiris/actions-hugo@32c7754570a8edd0ae33352fae4a8448f23858e9 # v3.1.0
uses: peaceiris/actions-hugo@2752ce1d29631191ea3f27c23495fa06139a5b78 # v3.2.1
with:
hugo-version: ${{ matrix.hugo-version }}
extended: ${{ matrix.extended }}
+2 -2
View File
@@ -24,7 +24,7 @@ jobs:
- 'macos-latest'
- 'windows-latest'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
@@ -53,4 +53,4 @@ jobs:
name: coverage-${{ matrix.os }}
path: coverage
- uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
+1 -1
View File
@@ -11,7 +11,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Update major tag
run: |
+9
View File
@@ -2,6 +2,15 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [3.2.1](https://github.com/peaceiris/actions-hugo/compare/v3.2.0...v3.2.1) (2026-05-10)
### fix
* handle Hugo 0.139.5 archive fallback (#696) ([4e5bf41](https://github.com/peaceiris/actions-hugo/commit/4e5bf412f00ba628ed366436825de7226933f80d)), closes [#696](https://github.com/peaceiris/actions-hugo/issues/696)
# [3.2.0](https://github.com/peaceiris/actions-hugo/compare/v3.1.0...v3.2.0) (2026-05-10)
+14 -1
View File
@@ -1,4 +1,4 @@
import getURL from '../src/get-url';
import getURL, {getDownloadVersion} from '../src/get-url';
describe('getURL()', () => {
test('get URLs to Linux assets', () => {
@@ -139,6 +139,19 @@ describe('getURL()', () => {
]);
});
test('get URLs to Hugo 0.139.5 archive alias', () => {
const baseURL = 'https://github.com/gohugoio/hugo/releases/download/v0.139.4';
expect(getDownloadVersion('0.139.5')).toBe('0.139.4');
expect(getURL('linux', 'amd64', 'true', '0.139.5')).toEqual([
`${baseURL}/hugo_extended_0.139.4_linux-amd64.tar.gz`,
`${baseURL}/hugo_extended_0.139.4_Linux-amd64.tar.gz`,
`${baseURL}/hugo_extended_0.139.4_Linux_amd64.tar.gz`,
`${baseURL}/hugo_extended_v0.139.4_linux-amd64.tar.gz`,
`${baseURL}/hugo_extended_v0.139.4_Linux-amd64.tar.gz`,
`${baseURL}/hugo_extended_v0.139.4_Linux_amd64.tar.gz`
]);
});
test('get a fallback URL to an unknown OS asset', () => {
const baseURL = 'https://github.com/gohugoio/hugo/releases/download/v0.58.2';
expect(getURL('MyOS', '64bit', 'false', '0.58.2')).toEqual([
-42519
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "actions-hugo",
"version": "3.2.0",
"version": "3.2.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "actions-hugo",
"version": "3.2.0",
"version": "3.2.1",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "actions-hugo",
"version": "3.2.0",
"version": "3.2.1",
"description": "GitHub Actions for Hugo",
"main": "lib/index.js",
"engines": {
+14 -3
View File
@@ -4,6 +4,8 @@ export default function getURL(
extended: string,
version: string
): string[] {
const downloadVersion = getDownloadVersion(version);
const extendedStr = (extended: string): string => {
if (extended === 'true') {
return 'extended_';
@@ -28,12 +30,12 @@ export default function getURL(
};
const baseURL = 'https://github.com/gohugoio/hugo/releases/download';
const assetBase = `hugo_${extendedStr(extended)}${version}_`;
const legacyVersionedAssetBase = `hugo_${extendedStr(extended)}v${version}_`;
const assetBase = `hugo_${extendedStr(extended)}${downloadVersion}_`;
const legacyVersionedAssetBase = `hugo_${extendedStr(extended)}v${downloadVersion}_`;
const assetBases = [assetBase, legacyVersionedAssetBase];
const assetURLs = (assetNames: string[]): string[] => {
return Array.from(new Set(assetNames)).map(assetName => {
return `${baseURL}/v${version}/${assetName}`;
return `${baseURL}/v${downloadVersion}/${assetName}`;
});
};
@@ -82,3 +84,12 @@ export default function getURL(
return assetURLs([`${assetBase}${os}-${arch}.tar.gz`]);
}
export function getDownloadVersion(version: string): string {
if (version === '0.139.5') {
// v0.139.5 has no release archives; Hugo publishes the same archives under v0.139.4.
return '0.139.4';
}
return version;
}
+7 -1
View File
@@ -5,7 +5,7 @@ import * as exec from '@actions/exec';
import {getConventions} from './get-conventions';
import getOS from './get-os';
import getArch from './get-arch';
import getURL from './get-url';
import getURL, {getDownloadVersion} from './get-url';
import * as path from 'path';
import {Tool, Action} from './constants';
@@ -123,6 +123,12 @@ export async function installer(version: string): Promise<void> {
core.debug(`Processor Architecture: ${archName}`);
const toolURLs: string[] = getURL(osName, archName, extended, version);
const downloadVersion = getDownloadVersion(version);
if (downloadVersion !== version) {
core.info(
`Hugo ${version} release does not publish archives; downloading v${downloadVersion} archives instead.`
);
}
const workDir = await createWorkDir();
const binDir = await createBinDir(workDir);