diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..342ece5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: + push: + pull_request: + branches: [ master ] + +env: + FORCE_COLOR: 1 + +jobs: + test: + runs-on: ubuntu-latest + name: test with node ${{ matrix.node-version }} + strategy: + matrix: + node-version: [12, 14, 16, 18, 20] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm test + - name: Inspect tarball + run: npm pack --dry-run + + publish: + needs: test + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://registry.npmjs.org/ + - run: npm publish --loglevel verbose + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a75c196..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: node_js - -os: linux - -node_js: - - node - - '12' - - '10' - - '8' - -script: - - npm test - -jobs: - include: - - stage: npm release - if: tag IS present - os: linux - node_js: '10' - deploy: - provider: npm - email: vatev.1+npm@gmail.com - api_key: - secure: HX/T3fZID3bc5ouaZrSP8YN3wVz2ECIAYTmGBLryXZBVDo+lX+ZHTeZ2SMPgLUjX3A9BSznrUPoQItTNtN/bLFSCrzLb9P3ou9i2hiPPAMOgTPMd33po+tkWHLksLYv466ChOqgTELY/JuNrSKrvh8BrbepMhSI0oz1dzvacps9JoanqtKUAPYjKfNjtKeNNkFzR21YTEEFiBN8iYjoH2c+S4t8Pt4Jf/8Zni/cleU8vQ3stFeNKXvduiCouaZAuoEe/Zv8+Bgxmz87YGxBqW9NKhngOkRHOidY4wg3fI4uWDIQQ4KtBAvdzRpzZykIyuDZMpsFcQapdCVX2VCRxjA4q0lxYzA3GurQoCeK0y3q1dwFL6ISCTZ9NVV0XKg+feygrI5Gj/6pYab61Te9foPsRj+f0yNJLbtDjva9zckwv4n1Rsb2LQDBM7yUnE0B36fVTRxOaW+lPxbNE2mcq7M3d/QHmh7A2cRX/cFxgWHs7vsmp5byNLI8/O+tK9P4nYkxL3kn6BUvoiJm8+vkDKszOlG1eHlz4XqtgcJVRWuo7uh4zFrVMqRua71rjDrsWWipzVhEtygV4K9TPNl0sdyTlBfGVFd802AHye55jR+LqY4QDS/WVCXjXSOMU7WgHMwoY491oZ6uc0mCloP6/zZwlc8JzaY6aFraTBwcliEY= - on: - tags: true - repo: catdad-experiments/heic-convert diff --git a/README.md b/README.md index 14d7955..c5f74f1 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,12 @@ > Convert HEIC/HEIF images to JPEG and PNG -[![travis][travis.svg]][travis.link] +[![ci][ci.svg]][ci.link] [![npm-downloads][npm-downloads.svg]][npm.link] [![npm-version][npm-version.svg]][npm.link] -[travis.svg]: https://travis-ci.com/catdad-experiments/heic-convert.svg?branch=master -[travis.link]: https://travis-ci.com/catdad-experiments/heic-convert +[ci.svg]: https://github.com/catdad-experiments/heic-convert/actions/workflows/ci.yml/badge.svg +[ci.link]: https://github.com/catdad-experiments/heic-convert/actions/workflows/ci.yml [npm-downloads.svg]: https://img.shields.io/npm/dm/heic-convert.svg [npm.link]: https://www.npmjs.com/package/heic-convert [npm-version.svg]: https://img.shields.io/npm/v/heic-convert.svg