[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple publishing packages from publishing CLIs #1778

Merged
merged 20 commits into from
Jun 28, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Automate version bumping in DevTools publishing workflow
  • Loading branch information
marcbouchenoire committed Jun 28, 2024
commit e539f0a406fe75fbed3f93e9679bd404ff628c8a
45 changes: 44 additions & 1 deletion .github/workflows/publish-devtools.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,44 @@
name: Publish Liveblocks DevTools extension

on: [workflow_dispatch]
on:
workflow_dispatch:
inputs:
tag:
type: string
required: true
description:
"Extension version to publish (use format vX.Y.Z, no '-test' or any
other tag). Can only be run from the 'main' branch."

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Validate branch
run: test "$(git rev-parse --abbrev-ref HEAD)" == "main"

- name: Validate version
env:
VERSION_TAG: ${{ inputs.tag }}
run: test "${VERSION_TAG}" =~ "^v[0-9]+\.[0-9]+\.[0-9]+$"

- name: Install moreutils
run: sudo apt-get install -y moreutils

- name: Install git-toolbelt
run: |
wget https://github.com/nvie/git-toolbelt/archive/v1.9.2.tar.gz
tar -xzf v1.9.2.tar.gz
mkdir -p "$HOME/.local/bin"
cp git-toolbelt-1.9.2/git-* "$HOME/.local/bin"
rm -rf v1.9.2.tar.gz git-toolbelt-1.9.2
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.WRITE_ACCESS_TOKEN }}

- name: Use Node.js
uses: actions/setup-node@v4
Expand All @@ -28,6 +58,19 @@ jobs:
path: node_modules/.cache/turbo
restore-keys: turbo-cache-@liveblocks/devtools-bust

- name: Set release version
id: version
env:
VERSION_TAG: ${{ inputs.tag }}
run: echo "value=${VERSION_TAG#v}" >> $GITHUB_OUTPUT

- name: Prepare release
env:
STRIPPED_VERSION: ${{steps.version.outputs.value}}
run:
./.github/scripts/release.sh -V "$STRIPPED_VERSION"
"tools/liveblocks-devtools"

- name: Build for Chromium
run: npx --no turbo run build --filter=@liveblocks/devtools

Expand Down
Loading