1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-25 19:34:44 +04:00
Files
tabler/.github/workflows/release-beta.yml
2024-09-16 20:30:31 +02:00

61 lines
1.5 KiB
YAML

name: Pre-release
on:
push:
branches:
- beta
- dev-changesets
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: PR or Release
if: ${{ github.repository_owner == 'tabler' }}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable pnpm
- name: Setup Node.js 18
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: pnpm install
- name: Build Package
run: pnpm run build
- name: Enable Pre-release
run: pnpm changeset pre enter beta
- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Release Pull Request
uses: changesets/action@v1
with:
# Note: pnpm install after versioning is necessary to refresh lockfile
version: pnpm changeset version && pnpm install
publish: pnpm release
commit: "chore: release"
title: "[ci] release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true