mirror of
https://github.com/zerotier/zerotier-one-api-spec.git
synced 2026-05-22 16:29:58 -07:00
feat: Initial commit
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build_lint_etc:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
- name: Install zerotier-one
|
||||
run: curl -s https://install.zerotier.com/ | sudo bash
|
||||
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
|
||||
- name: Set authtoken
|
||||
run: echo "AUTH_TOKEN=$(sudo cat /var/lib/zerotier-one/authtoken.secret)" >> $GITHUB_ENV
|
||||
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
|
||||
- name: Archive built docs html
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: index.html
|
||||
path: dist/index.html
|
||||
|
||||
- name: Archive built openapi spec
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: openapi.yaml
|
||||
path: tsp-output/@typespec/openapi3/openapi.yaml
|
||||
|
||||
- name: Archive built json schema
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: json-schema.json
|
||||
path: tsp-output/@typespec/json-schema/json-schema.json
|
||||
@@ -0,0 +1,40 @@
|
||||
name: npm version && npm publish
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
newversion:
|
||||
description: 'npm version {major,minor,patch}'
|
||||
required: true
|
||||
permissions:
|
||||
contents: write
|
||||
jobs:
|
||||
version_and_release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# fetch full history so things like auto-changelog work properly
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install zerotier-one
|
||||
run: curl -s https://install.zerotier.com/ | sudo bash
|
||||
|
||||
- name: Set auth token
|
||||
run: echo "AUTH_TOKEN=$(sudo cat /var/lib/zerotier-one/authtoken.secret)" >> $GITHUB_ENV
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npm test
|
||||
- run: git config --global user.email "travis.laduke@zerotier.com"
|
||||
- run: git config --global user.name "travis laduke"
|
||||
- run: npm version ${{ github.event.inputs.newversion }}
|
||||
- run: npm run release
|
||||
env:
|
||||
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user