mirror of
https://github.com/Mibew/simple-icons.git
synced 2024-11-16 02:14:12 +03:00
96a8ab301b
* Add sample Travis CI deploy step to tag commits on master and push that TODO: should find the version number from ./package.json * Get git name and email for tagging from env * Extract current version number from manifest Attempt... * Update .travis.yml Fix whitespace issue and command error * Switch sed order and escape double qoutes * Replace curly braces by parentheses * Test deploy of release tag to GitHub * Convert deploy back to script And update actual deploy step commands * Remove test deploy stage * Fix api_key value and remove leftover configuration
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
jobs:
|
|
include:
|
|
- stage: "Test"
|
|
name: "Lint"
|
|
language: node_js
|
|
node_js: 8
|
|
script:
|
|
- npm run jsonlint
|
|
- npm run svglint
|
|
- npm run wslint
|
|
- name: "Build website"
|
|
language: ruby
|
|
rvm: 2.4.1
|
|
install:
|
|
- gem install jekyll
|
|
script:
|
|
- jekyll build
|
|
- name: "Test package"
|
|
language: node_js
|
|
node_js: 8
|
|
script:
|
|
- npm run test
|
|
|
|
- stage: deploy
|
|
name: "Git tag"
|
|
if: branch = master
|
|
|
|
before_deploy:
|
|
- git config --local user.name "$GITHUB_USERNAME"
|
|
- git config --local user.email "$GITHUB_EMAIL"
|
|
- export PACKAGE_VERSION=$(cat package.json | grep 'version' | sed 's/[ \",:]//g' | sed 's/version//')
|
|
- git tag $PACKAGE_VERSION
|
|
deploy:
|
|
provider: releases
|
|
api_key: "$GITHUB_TOKEN"
|
|
skip_cleanup: true
|
|
- name: "NPM Package"
|
|
language: node_js
|
|
node_js: 8
|
|
if: branch = master
|
|
|
|
deploy:
|
|
provider: npm
|
|
skip_cleanup: true
|
|
email: "johanringmann@gmail.com"
|
|
api_key: "$NPM_KEY"
|
|
on:
|
|
branch: master
|
|
|
|
notifications:
|
|
email:
|
|
on_success: never
|
|
on_failure: change
|