Skip to content

Commit

Permalink
ci: add semantic-release with automatic new package publishing on merge
Browse files Browse the repository at this point in the history
  • Loading branch information
nodkz committed May 25, 2021
1 parent 47b7798 commit efadc10
Show file tree
Hide file tree
Showing 4 changed files with 3,235 additions and 2,791 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [nodkz]
patreon: # Replace with a single Patreon username
open_collective: # graphql-compose
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
27 changes: 27 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on: [push, pull_request]

jobs:
publish:
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install node_modules
run: yarn install
- name: Build
run: yarn build
- name: Semantic Release (publish to npm)
run: yarn semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "mjml-with-images-loader",
"version": "2.0.0",
"version": "0.0.0-semantically-released",
"description": "MJML loader for webpack with images",
"main": "index.js",
"files": [
"index.js"
],
"scripts": {
"test": "jest",
"watch": "jest --watch"
"build": "echo \"nothing to build, pack as is\"",
"semantic-release": "semantic-release"
},
"repository": {
"type": "git",
Expand All @@ -28,16 +28,15 @@
"homepage": "https://github.com/nodkz/mjml-with-images-loader#readme",
"dependencies": {
"base64-image-loader": "^1.0.0",
"colors": "^1.1.2",
"crypto": "0.0.3",
"colors": "1.4.0",
"loader-utils": "^1.1.0"
},
"peerDependencies": {
"mjml": ">=4.1.0"
},
"devDependencies": {
"jest": "^20.0.4",
"mjml": "^4.3.0"
"mjml": "4.9.3",
"semantic-release": "^17.4.3"
},
"jest": {
"roots": [
Expand Down
Loading

0 comments on commit efadc10

Please sign in to comment.