mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-04 19:20:28 +09:00
## Description preview-worker-deployment Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, pnpm/action-setup@v2.2.4, actions/setup-node@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/. ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 5de6) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env.example` and the `builder/env-check.js` if mandatory
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
name: Publish beta packages on NPM 📦
|
|
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- labeled
|
|
|
|
jobs:
|
|
publish:
|
|
# prevents this action from running on forks
|
|
if: |
|
|
github.repository_owner == 'webstudio-is' &&
|
|
startsWith(github.event.label.name, 'publish:')
|
|
|
|
timeout-minutes: 20
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
DATABASE_URL: postgres://
|
|
AUTH_SECRET: test
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }} # HEAD commit instead of merge commit
|
|
|
|
- uses: ./.github/actions/ci-setup
|
|
|
|
- name: Creating .npmrc
|
|
run: |
|
|
cat << EOF > "$HOME/.npmrc"
|
|
//registry.npmjs.org/:_authToken=$NPM_TOKEN
|
|
EOF
|
|
env:
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
# compute short sha
|
|
- id: short_sha
|
|
run: echo "value=$(echo ${{ github.event.pull_request.head.sha || github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
|
|
|
|
- id: tag
|
|
run: echo "value=$(echo ${{ github.event.label.name }} | cut -d ':' -f2)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Creating version using ${{ steps.short_sha.outputs.value }} sha
|
|
run: pnpm -r exec pnpm version prepatch --preid ${{ steps.short_sha.outputs.value }}
|
|
|
|
- run: pnpm -r build
|
|
- run: pnpm -r dts
|
|
|
|
- name: Publishing ${{ steps.tag.outputs.value }} tag with sha ${{ steps.short_sha.outputs.value }}
|
|
run: pnpm -r publish --tag "${{ steps.tag.outputs.value }}" --no-git-checks --access public
|