Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"commit": false,
"access": "public",
"baseBranch": "beta",
"baseBranch": "main",
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
Expand Down
30 changes: 5 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [develop, beta]
branches: [v2, main]
pull_request:
branches: [develop, beta]
branches: [v2, main]

jobs:
build-and-test:
Expand Down Expand Up @@ -55,11 +55,9 @@ jobs:

release:
name: Release (latest or beta)
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/beta'
if: github.ref == 'refs/heads/v2' || github.ref == 'refs/heads/main'
needs: [build-and-test]
runs-on: ubuntu-latest
outputs:
published: ${{ steps.changesets.outputs.published }}
steps:
- uses: actions/checkout@v5
- name: Setup Node.js environment
Expand All @@ -79,8 +77,8 @@ jobs:
publish: npm run release
title: "chore(new-release)"
commit: "chore(new-release)"
branch: ${{ github.ref == 'refs/heads/beta' && 'beta' || null }}
createGithubReleases: ${{ github.ref == 'refs/heads/develop' }}
branch: ${{ github.ref == 'refs/heads/main' && 'main' || null }}
createGithubReleases: ${{ github.ref == 'refs/heads/v2' }}
env:
GITHUB_TOKEN: ${{ secrets.STACKS_TOOLING_GH_RW_PAT }}
NPM_TOKEN: ${{ secrets.NPM_API_KEY }}
Expand All @@ -97,24 +95,6 @@ jobs:
This is a technical user which does not trigger actions workflows on push events.
See this GH issue for more details: https://github.com/changesets/action/issues/187

update-docs:
name: Update main site stackoverflow.design
if: ${{ needs.release.outputs.published == 'true' && github.ref == 'refs/heads/develop' }}
needs: [build-and-test, release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: 🔄 Update stackoverflow.design docs
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git fetch origin
git checkout production
git merge --no-ff --allow-unrelated-histories origin/develop -m "chore: merge develop into production"
git push origin production
env:
GITHUB_TOKEN: ${{ secrets.STACKS_TOOLING_GH_RW_PAT }}

# cancel the jobs if another workflow is kicked off for the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
Loading