This commit is contained in:
Renée Kooi 2020-01-23 10:56:47 +01:00
parent b1d893be2f
commit 25e170b42c
No known key found for this signature in database
GPG Key ID: 497533BAECCD642A
3 changed files with 9 additions and 4 deletions

View File

@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## 1.2.0
* Allow setting `version: master` to get the latest build from the development branch.
## 1.1.0
* Load the zig binaries from tool cache if available.
* Use the ziglang.org download index instead of downloading from Github Releases.

8
dist/index.js vendored
View File

@ -1125,8 +1125,10 @@ async function downloadZig (version) {
const index = await getJSON({ url: 'https://ziglang.org/download/index.json' })
const availableVersions = Object.keys(index).filter((v) => semver.valid(v))
const useVersion = semver.maxSatisfying(availableVersions, version)
const availableVersions = Object.keys(index)
const useVersion = semver.valid(version)
? semver.maxSatisfying(availableVersions.filter((v) => semver.valid(v)), version)
: null
const meta = index[useVersion || version]
if (!meta || !meta[host]) {
@ -1150,7 +1152,7 @@ async function downloadZig (version) {
async function main () {
const version = actions.getInput('version') || '0.5.0'
if (semver.lt(version, '0.3.0')) {
if (semver.valid(version) && semver.lt(version, '0.3.0')) {
actions.setFailed('This action does not work with Zig 0.1.0 and Zig 0.2.0')
return
}

View File

@ -1,7 +1,7 @@
{
"name": "setup-zig",
"description": "Use the zig compiler in your Github Action",
"version": "1.1.0",
"version": "1.2.0",
"author": "Renée Kooi <renee@kooi.me>",
"bugs": {
"url": "https://github.com/goto-bus-stop/setup-zig/issues"