peaceiris / actions-hugo

GitHub Actions for Hugo ⚡️ Setup Hugo quickly and build your site fast. Hugo extended, Hugo Modules, Linux (Ubuntu), macOS, and Windows are supported.
https://github.com/marketplace/actions/hugo-setup
MIT License
1.37k stars 80 forks source link

support: Hugo version v0.102.0+ on macos support #605

Open erdaltsksn opened 1 year ago

erdaltsksn commented 1 year ago

Checklist

Describe your question

In version v0.102.0:

https://github.com/gohugoio/hugo/releases/tag/v0.102.0

Relevant links

YAML config:
      - name: Set up Hugo
        uses: peaceiris/actions-hugo@v2
        with:
          hugo-version: 0.102.2
          extended: true

Relevant log output

Run peaceiris/actions-hugo@v2
  with:
    hugo-version: 0.102.2
    extended: true
Hugo version: 0.102.2
##[debug]Hugo extended: true
##[debug]Operating System: macOS
##[debug]Processor Architecture: 64bit
##[debug]toolURL: https://github.com/gohugoio/hugo/releases/download/v0.102.2/hugo_extended_0.102.2_macOS-64bit.tar.gz
##[debug]homeDir: /Users/runner
##[debug]workDir: /Users/runner/actions_hugo
##[debug]binDir: /Users/runner/actions_hugo/bin
##[debug]tempDir: /Users/runner/actions_hugo/_temp
##[debug]Downloading https://github.com/gohugoio/hugo/releases/download/v0.102.2/hugo_extended_0.102.2_macOS-64bit.tar.gz
##[debug]Destination /Users/runner/work/_temp/22756f02-0de5-4cda-bb34-c76a19a75ce2
##[debug]Failed to download from "https://github.com/gohugoio/hugo/releases/download/v0.102.2/hugo_extended_0.102.2_macOS-64bit.tar.gz". Code(404) Message(Not Found)
Error: Action failed with error Unexpected HTTP response: 404
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Set up Hugo
peaceiris commented 1 year ago

👀

peaceiris commented 1 year ago

The Hugo macOS release asset has been renamed in v0.102.0

- https://github.com/gohugoio/hugo/releases/download/v0.101.0/hugo_extended_0.101.0_macOS-64bit.tar.gz
+ https://github.com/gohugoio/hugo/releases/download/v0.102.0/hugo_extended_0.102.0_macOS-universal.tar.gz

I will work on this.

erdaltsksn commented 1 year ago

The Hugo macOS release asset has been renamed in v0.102.0

- https://github.com/gohugoio/hugo/releases/download/v0.101.0/hugo_extended_0.101.0_macOS-64bit.tar.gz
+ https://github.com/gohugoio/hugo/releases/download/v0.102.0/hugo_extended_0.102.0_macOS-universal.tar.gz

I will work on this.

Any update?

I don't know typescript but putting something like if the version is 0.102.0 or later, assign arch as universal should fix it.

File: get-url.ts