-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (35 loc) · 1.17 KB
/
release-alpha.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: 'Publish Alpha Version'
on:
push:
branches:
- develop
jobs:
publish:
name: 🚀 Publishing to NPM
runs-on: ubuntu-latest
strategy:
matrix:
package: [core, vue, react, solid, svelte, vanilla]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 22
registry-url: https://registry.npmjs.org/
- name: Set variables
run: |
echo "COMMIT_ID=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "VERSION=$(npm view ./packages/${{ matrix.package }} version)" >> $GITHUB_ENV
- name: Build packages
run: |
pnpm install --no-frozen-lockfile
pnpm build
- name: Publish packages
run: |
pnpm --filter "@qr-x/${{ matrix.package }}" --filter "[origin/develop]" exec pnpm version ${{ env.VERSION }}-alpha.${{ env.COMMIT_ID }}
pnpm --filter "@qr-x/${{ matrix.package }}" --filter "[origin/develop]" publish --tag alpha --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}