Skip to content

Commit

Permalink
Merge pull request #10 from Yoonit-Labs/development
Browse files Browse the repository at this point in the history
Merging development into main
  • Loading branch information
gabrielrizzo authored Aug 26, 2021
2 parents a7979d2 + 57010fc commit d4f302c
Show file tree
Hide file tree
Showing 17 changed files with 26,312 additions and 26,239 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: deploy

on:
release:
types: [ created ]

jobs:
deploy:
if: ${{ contains(github.ref, 'refs/tags/release-') }}
runs-on: ubuntu-latest
steps:
# GET TAG VERSION & RELEASE_VERSION IN $GITHUB_ENV
- name: Get TAG_VERSION & RELEASE_VERSION
run: |
echo "TAG_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/release-}" >> $GITHUB_ENV
# CHECKOUT REPOSITORY
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: master
# SETUP NODE ENV W/ NPM PUBLIC REGISTRY
- name: Setup Node Env
uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'
# CONFIGURE GIT
- name: Configure Git
run: |
git config user.name github-ci
git config user.email [email protected]
# RUN SCRIPTS
- name: Update package version
run: node -e "let pkg=require('./package.json'); pkg.version='${{ env.RELEASE_VERSION }}'; require('fs').writeFileSync('./package.json', JSON.stringify(pkg, null, 2));"
- name: Build Package
run: |
npm install
npm run build
# PUBLISH VUE PACKAGE
- name: Publish VueJS Package
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# ADD & COMMIT CHANGES
- name: Add & Commit Changes
run: |
git add .
git commit -am "[github-ci] Published Version"
git push origin main:npm --force
# TAG VERSION
- name: Tag Version
run: |
git tag -a ${{ env.TAG_VERSION }} -m ${{ env.TAG_VERSION }} --force
git push --tags --force
# SUCCESS MESSAGE TO DISCORD
- name: Success Message to Discord
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.WEBHOOK_URL }}
title: "Published @yoonit/rxjs-yoonit-store v${{ env.RELEASE_VERSION }}"
description: |
A new release has been published:
[Click here to go to the release page](https://github.com/Yoonit-Labs/rxjs-yoonit-store/releases/tag/${{ env.TAG_VERSION }})
color: 0x00ff00
username: GitHub Actions
21 changes: 21 additions & 0 deletions .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: run_test:unit

on: [push, workflow_dispatch]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run test:unit
36 changes: 0 additions & 36 deletions .gitlab-ci.yml

This file was deleted.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ npm install @yoonit/yoox
import Yoox from @yoonit/yoox
import yourStore from './yourstore'
Yoox.store(yourStore, { persist: true })
const myStore = Yoox.store(yourStore, { persist: true, onLoad: hideLoad })
```

## store object
Expand Down Expand Up @@ -159,3 +159,5 @@ It's only necessary to pass { persist: true } to the second parameter on store,

- When there is a change on store modules, persisted data is reseted, to not cause trouble with wrong store structure.

- It's highly recommended to use onLoad method to guarantee that persisted data have been loaded to Yoox state. Ie: Show load until onLoad callback is called.

Loading

0 comments on commit d4f302c

Please sign in to comment.