Skip to content

Commit

Permalink
build: fix release and build
Browse files Browse the repository at this point in the history
  • Loading branch information
Samsam Ahmadi committed Mar 20, 2021
1 parent 18767ca commit d889111
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/templates/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
### Changes

$CHANGES
$CHANGES
30 changes: 8 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,23 @@ on:
push:
tags:
- 'v*.*.*'

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Get Latest Tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Create Release
uses: ntltd/release-generator@master
with:
baseTag: ${{ github.event.release.tag_name }}
releaseTag: ${{ github.event.release.tag_name }}
baseTag: ${{ steps.bump_version.outputs.previous_tag }}
releaseTag: ${{ env.RELEASE_VERSION }}
prerelease: false
draft: false
releaseName: ${{ github.event.release.tag_name }}
releaseName: ${{ env.RELEASE_VERSION }}
templatePath: templates/release.md
token: ${{ github.token }}
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- name: Install and Build 🔧
run: |
npm install
npm run build
- name: Deploy 🚀
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
token: ${{ github.token }}
8 changes: 6 additions & 2 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ jobs:
npm install
npm run build-storybook
- name: Deploy 🚀
run: |
npm run deploy
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: docs-build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-trip-date",
"version": "1.1.0",
"version": "1.1.1",
"description": "date-picker and range-picker for React applications",
"author": "Samsam Ahmadi",
"license": "GPL-3.0",
Expand Down Expand Up @@ -48,7 +48,7 @@
"sort:check": "import-sort -l 'src/**/*.{ts,tsx,js,jsx}'",
"storybook": "start-storybook -p 9009",
"deploy": "gh-pages -d storybook-static",
"build-storybook": "build-storybook -c .storybook -o storybook-static"
"build-storybook": "build-storybook -c .storybook -o docs-build"
},
"eslintConfig": {
"extends": [
Expand Down

0 comments on commit d889111

Please sign in to comment.