Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5638 from select2/github-actions
Enable GitHub Actions to replace Travis CI
- Loading branch information
Showing
444 changed files
with
25,919 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Documentation Deployment | ||
|
||
on: release | ||
|
||
jobs: | ||
grav: | ||
name: Deploy Grav | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Copy to documentation server | ||
uses: maxheld83/rsync@v0.1.0 | ||
env: | ||
USERNAME: ${{ secrets.DOCUMENTATION_SSH_USERNAME }} | ||
SSH_PRIVATE_KEY: ${{ secrets.DOCUMENTATION_SSH_KEY }} | ||
HOST_NAME: ${{ secrets.DOCUMENTATION_SSH_HOST }} | ||
SSH_PUBLIC_KEY: not-needed | ||
HOST_IP: not-needed | ||
HOST_FINGERPRINT: not-needed | ||
with: | ||
args: "docs/ $USERNAME@$HOST_NAME:/var/www/select2-docs/user/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
linting: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js 8 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 8 | ||
- name: npm install | ||
run: npm install | ||
- name: Run linting | ||
run: grunt compile lint | ||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js 8 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 8 | ||
- name: npm install | ||
run: npm install | ||
- name: Run tests | ||
run: grunt compile test | ||
minification: | ||
name: Minification | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js 8 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 8 | ||
- name: npm install | ||
run: npm install | ||
- name: Run minification | ||
run: grunt compile minify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Package Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
release: ~ | ||
|
||
jobs: | ||
deploy_github: | ||
name: GitHub Package Registry | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js 8 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 8 | ||
registry-url: https://npm.pkg.github.com/ | ||
scope: '@select2' | ||
- name: npm install | ||
run: npm install | ||
- name: Run linting, tests, minify | ||
run: grunt | ||
- name: Deploy (release) | ||
if: github.event_name == 'release' | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
- name: Deploy (release candidate) | ||
if: github.event_name == 'push' | ||
run: | | ||
npm --no-git-tag-version version prerelease | ||
npm publish --tag next | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
deploy_npm: | ||
name: NPM | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js 8 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 8 | ||
registry-url: https://npm.pkg.github.com/ | ||
scope: '@select2' | ||
- name: npm install | ||
run: npm install | ||
- name: Run linting, tests, minify | ||
run: grunt | ||
- name: Deploy (release) | ||
if: github.event_name == 'release' | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.