mirror of
https://github.com/chenasraf/formplex-react.git
synced 2026-05-17 17:48:11 +00:00
51 lines
1.8 KiB
YAML
51 lines
1.8 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '14.x'
|
|
- run: yarn install --frozen-lockfile
|
|
# - run: yarn test
|
|
- run: yarn build
|
|
- run: cd ./dist && yarn pack --filename=../package.tgz
|
|
if: "!contains(github.event.head_commit.message, '[skip publish]')"
|
|
- uses: Klemensas/action-autotag@stable
|
|
if: "!contains(github.event.head_commit.message, '[skip publish]')"
|
|
id: update_tag
|
|
with:
|
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
|
tag_prefix: 'v'
|
|
- name: Publish on NPM
|
|
uses: JS-DevTools/npm-publish@v1
|
|
with:
|
|
package: ./dist/package.json
|
|
token: '${{ secrets.NPM_TOKEN }}'
|
|
- name: Create Release
|
|
if: steps.update_tag.outputs.tagname && !contains(github.event.head_commit.message, '[skip publish]')
|
|
uses: actions/create-release@v1
|
|
id: create_release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ steps.update_tag.outputs.tagname }}
|
|
release_name: Release ${{ steps.update_tag.outputs.tagname }}
|
|
- name: Upload Release Asset
|
|
if: steps.update_tag.outputs.tagname && !contains(github.event.head_commit.message, '[skip publish]')
|
|
id: upload-release-asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./package.tgz
|
|
asset_name: formplex-react ${{ steps.update_tag.outputs.tagname }}.tgz
|
|
asset_content_type: application/tgz
|