mirror of
https://github.com/chenasraf/simple-scaffold.git
synced 2026-05-18 01:29:09 +00:00
53 lines
1.9 KiB
YAML
53 lines
1.9 KiB
YAML
name: Alpha Releases
|
|
|
|
on:
|
|
push:
|
|
branches: [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: "12.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
|
|
if: "!contains(github.event.head_commit.message, '[skip 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, '[skip 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, '[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: simple-scaffold ${{ steps.update_tag.outputs.tagname }}.tgz
|
|
asset_content_type: application/tgz
|