mirror of
https://github.com/alexgo-io/stacks.js.git
synced 2026-01-12 22:52:34 +08:00
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
# based on: https://github.com/hirosystems/gh-actions-example/blob/main/.github/workflows/ci.yml
|
|
name: release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags-ignore:
|
|
- "**"
|
|
paths-ignore:
|
|
- "**/CHANGELOG.md"
|
|
- "**/package.json"
|
|
|
|
jobs:
|
|
release:
|
|
name: Release
|
|
runs-on: ubuntu-latest
|
|
# Only run on non-PR events or only PRs that aren't from forks
|
|
if: github.event_name == 'push'
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set Node Version
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 16
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Bootstrap
|
|
run: npm run bootstrap
|
|
|
|
- name: Test
|
|
run: npm run test
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: "Release: Version"
|
|
run: |
|
|
git config user.name github-actions
|
|
git config user.email github-actions@github.com
|
|
lerna version --conventional-commits --conventional-prerelease --preid beta --yes
|
|
|
|
- name: "Release: Publish"
|
|
run: lerna publish from-git --pre-dist-tag beta --yes
|
|
env:
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|