Skip to content

Commit

Permalink
Merge pull request #12 from openameba/chore/prepare-publish
Browse files Browse the repository at this point in the history
Setup for release
  • Loading branch information
herablog authored Aug 18, 2020
2 parents cac4460 + c8bb67d commit fa7de58
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: publishing

on:
push:
tags:
- '@openameba/*'

jobs:
publish:
name: publishing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: 14
- name: Log in to npm
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
npm whoami
- name: Publishing with lerna
run: npx lerna publish from-git
34 changes: 34 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: versioning

on:
push:
branches:
- version/major
- version/minor
- version/patch
- version/premajor
- version/preminor
- version/prepatch
- version/prerelease

jobs:
version:
name: versioning
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: 14
- name: Set git user
run: |
git config --global user.email "<>"
git config --global user.name "openameba"
- name: Extract version from branch name
run: echo "::set-output name=version::$(echo ${GITHUB_REF##*/})"
id: extract_version
- name: Versioning with lerna
# also see some options in lerna.json
run: npx lerna version ${{ steps.extract_version.outputs.version }} --conventional-commits --create-release github --yes --no-private
env:
GH_TOKEN: ${{ github.token }}
8 changes: 7 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@
"version": "independent",
"packages": [
"packages/*"
]
],
"command": {
"version": {
"message": "chore(release): publish",
"allowBranch": "version/*"
}
}
}
5 changes: 4 additions & 1 deletion packages/spindle-icons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openameba/spindle-icons",
"version": "0.1.0",
"version": "0.0.1",
"scripts": {
"clean": "npx rimraf dist",
"mkdir": "npx mkdirp dist",
Expand All @@ -16,6 +16,9 @@
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@types/cli-progress": "^3.7.0",
"axios": "^0.19.2",
Expand Down

0 comments on commit fa7de58

Please sign in to comment.