diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 4e5bb0d..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: ci -on: - push: - branches: - - main - pull_request: - branches: - - main -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - node-version: [lts/*] - os: [ubuntu-latest] - timeout-minutes: 30 - steps: - - uses: actions/checkout@v3 - - name: install node - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - registry-url: 'https://npm.pkg.github.com' - - run: | - npm install -g @holepunchto/bare-runtime - npm install - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: bare-dev install - - run: npm test diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml new file mode 100644 index 0000000..c51987d --- /dev/null +++ b/.github/workflows/prebuild.yml @@ -0,0 +1,32 @@ +name: Prebuild +on: + workflow_dispatch: +jobs: + prebuild: + strategy: + matrix: + node: [20] + os: [ubuntu-22.04, macos-12, macos-14, windows-2022] + include: + - os: ubuntu-22.04 + name: linux-x64 + - os: macos-12 + name: darwin-x64 + - os: macos-14 + name: darwin-arm64 + - os: windows-2022 + name: win32-x64 + runs-on: ${{ matrix.os }} + name: ${{ matrix.name }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + - run: npm install -g bare-runtime bare-dev + - run: npm install + - run: bare-dev install + - uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.name }} + path: prebuilds/* diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6968f63 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: Test +on: + push: + branches: + - main + pull_request: + branches: + - main +jobs: + test: + strategy: + matrix: + node: [lts/*] + os: [ubuntu-latest] + include: + - os: ubuntu-latest + name: ubuntu + runs-on: ${{ matrix.os }} + name: ${{ matrix.name }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + - run: npm install -g bare-runtime bare-dev + - run: npm install + - run: bare-dev install + - run: npm test diff --git a/package.json b/package.json index 6c4d090..4e5bbd1 100644 --- a/package.json +++ b/package.json @@ -11,12 +11,15 @@ "lib", "prebuilds" ], + "addon": { + "target": "bare_os" + }, "scripts": { "test": "standard && bare test.js" }, "repository": { "type": "git", - "url": "https://github.com/holepunchto/bare-os.git" + "url": "git+https://github.com/holepunchto/bare-os.git" }, "author": "Holepunch", "license": "Apache-2.0", @@ -27,8 +30,5 @@ "devDependencies": { "brittle": "^3.1.1", "standard": "^17.0.0" - }, - "addon": { - "target": "bare_os" } }