mirror of
https://github.com/chenasraf/formplex-react.git
synced 2026-05-18 01:49:08 +00:00
55 lines
2.0 KiB
YAML
55 lines
2.0 KiB
YAML
name: Alpha Releases
|
|
|
|
on:
|
|
push:
|
|
branches: [develop, fix/*, feature/*]
|
|
# pull_request:
|
|
# branches: [master, develop]
|
|
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, '[publish]')"
|
|
- uses: Klemensas/action-autotag@stable
|
|
if: "contains(github.event.head_commit.message, '[publish]')"
|
|
id: update_tag
|
|
with:
|
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
|
tag_prefix: 'v'
|
|
- name: Publish on NPM
|
|
uses: JS-DevTools/npm-publish@v1
|
|
if: "contains(github.event.head_commit.message, '[publish]')"
|
|
with:
|
|
package: ./dist/package.json
|
|
token: '${{ secrets.NPM_TOKEN }}'
|
|
- name: Create Release
|
|
if: steps.update_tag.outputs.tagname && contains(github.event.head_commit.message, '[publish]')
|
|
uses: actions/create-release@v1
|
|
id: create_release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
prerelease: true
|
|
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, '[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
|