diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..fb7808c3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: ci + +on: + push: + branches: + - master + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v2 + with: + node-version: 18 + - run: npm install + - run: npm run build + - run: npm run dist + - run: npm run test + + diff --git a/.github/workflows/page.yml b/.github/workflows/page.yml new file mode 100644 index 00000000..86a6facf --- /dev/null +++ b/.github/workflows/page.yml @@ -0,0 +1,31 @@ +name: Deploy to GH Pages + +on: + push: + branches: + - master + +permissions: + pages: write + contents: read + id-token: write + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v2 + with: + node-version: 18 + - run: npm install + - run: npm run build + - run: npm run dist + - run: mv dist docs + - uses: actions/configure-pages@v3 + - uses: actions/upload-pages-artifact@v1 + with: + path: docs + - run: find docs + - uses: actions/deploy-pages@v1 + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..98616276 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: release + +on: + push: + tags: + - '*' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v2 + with: + node-version: 18 + registry-url: 'https://registry.npmjs.org' + - run: npm install + - run: npm run build + - run: npm run dist + - run: npm run test + - run: npm pkg set name=$(basename ${{github.repository}}) + - run: npm pkg set version=${{github.ref_name}} + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index 3b8760e3..3de53963 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ *.iml .DS_Store /node_modules -/build +/dist npm-debug.log /.reify-cache /experiments diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index acc889c2..00000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -node_js: -- '10' -- '12' -deploy: - provider: npm - email: "$NPM_EMAIL" - api_key: "$NPM_TOKEN" - on: - tags: true - repo: opentypejs/opentype.js