Skip to content

Commit

Permalink
Merge pull request #2 from foobaragency/automate-publish
Browse files Browse the repository at this point in the history
Automate package version publish
  • Loading branch information
iamleniac authored Jan 17, 2022
2 parents 52c6aee + e54ef95 commit 8afc9fc
Show file tree
Hide file tree
Showing 3 changed files with 3,178 additions and 38 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
workflow_dispatch:
branches:
- master
push:
branches:
- master

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 // get the entire history
token: ${{ secrets.GH_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Semantic Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn semantic-release
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@foobar-agency/react-global-state",
"version": "1.0.2",
"version": "0.0.0-semantically-released",
"description": "A simple yet powerful library for managing global states with react",
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
"types": "./lib/esm/index.d.ts",
Expand Down Expand Up @@ -36,7 +37,8 @@
"fix": "yarn lint:prettier --write && yarn lint --fix",
"generate:apidocs": "bash scripts/generate-api-docs.sh",
"lint": "eslint --ext .ts --cache src",
"lint:prettier": "prettier \"**/*.{js,ts,json,md,yml}\""
"lint:prettier": "prettier \"**/*.{js,ts,json,md,yml}\"",
"semantic-release": "semantic-release"
},
"dependencies": {
"safe-stable-stringify": "^2.3.1"
Expand All @@ -45,6 +47,10 @@
"react": "^17.0.2"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^8.0.2",
"@semantic-release/npm": "^8.0.3",
"@types/react": "^17.0.38",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
Expand All @@ -56,6 +62,7 @@
"react": "^17.0.2",
"react-dom": "^17.0.2",
"safe-stable-stringify": "^2.3.1",
"semantic-release": "^18.0.1",
"typedoc": "^0.22.10",
"typedoc-plugin-markdown": "^3.11.11",
"typescript": "^4.5.4"
Expand Down
Loading

0 comments on commit 8afc9fc

Please sign in to comment.