Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9318b00d5 | ||
|
|
bf40fde936 | ||
|
|
92c5bc2cef | ||
|
|
37397a08ec |
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
@@ -14,7 +14,30 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest]
|
os: [ubuntu-latest, macos-latest]
|
||||||
bun-version:
|
bun-version:
|
||||||
["latest", "0.1.3", "latest"]
|
["latest", "0.1.4"]
|
||||||
|
misc-test-builds:
|
||||||
|
[false]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Bun - Test Builds * ${{ matrix.misc-test-builds }}
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
bun-version: ${{ matrix.bun-version }}
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
misc-test-builds: ${{ matrix.misc-test-builds }}
|
||||||
|
|
||||||
|
- name: Try bun
|
||||||
|
run: |
|
||||||
|
bun --version
|
||||||
|
test-canary:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest]
|
||||||
|
bun-version:
|
||||||
|
["canary"]
|
||||||
misc-test-builds:
|
misc-test-builds:
|
||||||
[false]
|
[false]
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,10 @@ Set up your GitHub Actions workflow with a specific version of Bun.
|
|||||||
bun-version: "0.1.3"
|
bun-version: "0.1.3"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Test builds
|
### Canary builds
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: xhyrom/setup-bun@v0.1.3
|
- uses: xhyrom/setup-bun@v0.1.3
|
||||||
with:
|
with:
|
||||||
bun-version: latest
|
bun-version: canary
|
||||||
misc-test-builds: true
|
|
||||||
```
|
```
|
||||||
|
|||||||
2
dist/utils/getGithubRelease.js
vendored
2
dist/utils/getGithubRelease.js
vendored
@@ -5,7 +5,7 @@ export default async (version, token, miscTestBuilds) => {
|
|||||||
if (version === 'latest' || miscTestBuilds)
|
if (version === 'latest' || miscTestBuilds)
|
||||||
url = `https://api.github.com/repos/${repository}/releases/latest`;
|
url = `https://api.github.com/repos/${repository}/releases/latest`;
|
||||||
else
|
else
|
||||||
url = `https://api.github.com/repos/${repository}/releases/tags/bun-v${version}`;
|
url = `https://api.github.com/repos/${repository}/releases/tags/${version.includes('canary') ? version : `bun-v${version}`}`;
|
||||||
const release = await (await fetch(url, {
|
const release = await (await fetch(url, {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "0.1.4",
|
"version": "0.1.5",
|
||||||
"name": "setup-bun",
|
"name": "setup-bun",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { getInput } from '@actions/core';
|
|
||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
|
|
||||||
export interface Asset {
|
export interface Asset {
|
||||||
@@ -19,7 +18,7 @@ export default async(version: string, token: string, miscTestBuilds: boolean): P
|
|||||||
const repository = miscTestBuilds ? 'oven-sh/misc-test-builds' : 'oven-sh/bun'
|
const repository = miscTestBuilds ? 'oven-sh/misc-test-builds' : 'oven-sh/bun'
|
||||||
let url;
|
let url;
|
||||||
if (version === 'latest' || miscTestBuilds) url = `https://api.github.com/repos/${repository}/releases/latest`;
|
if (version === 'latest' || miscTestBuilds) url = `https://api.github.com/repos/${repository}/releases/latest`;
|
||||||
else url = `https://api.github.com/repos/${repository}/releases/tags/bun-v${version}`;
|
else url = `https://api.github.com/repos/${repository}/releases/tags/${version.includes('canary') ? version : `bun-v${version}`}`;
|
||||||
|
|
||||||
const release: any = await (await fetch(url, {
|
const release: any = await (await fetch(url, {
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
Reference in New Issue
Block a user