mirror of
https://github.com/alexgo-io/stacks.js.git
synced 2026-01-12 22:52:34 +08:00
58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
name: version
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags-ignore:
|
|
- "**"
|
|
paths-ignore:
|
|
- "**.md"
|
|
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
COMMIT_USER: Hiro DevOps
|
|
COMMIT_EMAIL: 45208873+blockstack-devops@users.noreply.github.com
|
|
|
|
jobs:
|
|
pre-run:
|
|
uses: ./.github/workflows/pre-run.yml
|
|
secrets: inherit
|
|
|
|
version:
|
|
runs-on: ubuntu-latest
|
|
needs: pre-run
|
|
if: "needs.pre-run.outputs.is-not-fork == 'true' && !contains(github.event.head_commit.message, 'chore: version packages')"
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
ref: master
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
cache: npm
|
|
|
|
- run: npm ci
|
|
- run: npm run bootstrap
|
|
|
|
# workaround for changesets/action to allow not using changesets
|
|
# todo: add `force` option on fork to allow removing this workaround
|
|
- run: |
|
|
npx changeset init
|
|
npx changeset --empty
|
|
echo '.changeset/' >> .git/info/exclude
|
|
|
|
- run: git tag -d $(git tag | grep 'beta')
|
|
|
|
- name: Create Release Pull Request
|
|
uses: janniks/changesets-action@main
|
|
with:
|
|
title: "chore: version packages"
|
|
commit: "chore: version packages"
|
|
version: "npm run ci:version"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
|