mirror of
https://github.com/alexgo-io/stacks.js.git
synced 2026-04-29 09:45:50 +08:00
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: version
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags-ignore:
|
|
- "**"
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
pre_run:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Cancel Previous Runs
|
|
uses: styfle/cancel-workflow-action@ad6cb1b847ffb509a69b745b6ee2f1d14dfe14b8
|
|
with:
|
|
access_token: ${{ github.token }}
|
|
|
|
publish_beta:
|
|
runs-on: ubuntu-latest
|
|
needs: pre_run
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
# pulls all tags (needed for lerna to correctly version)
|
|
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
cache: npm
|
|
|
|
- run: npm ci
|
|
- run: npm run bootstrap
|
|
|
|
# hack changesets/action to allow not using changesets
|
|
- run: |
|
|
touch .changesets/fake-changeset.md
|
|
git update-index --assume-unchanged .changesets/fake-changeset.md
|
|
|
|
- name: Create Release Pull Request
|
|
uses: changesets/action@v1
|
|
with:
|
|
version: git tag -d `git tag | grep -E 'beta'` && npx lerna version --conventional-commits --no-push --no-git-tag-version --yes
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|