-
Notifications
You must be signed in to change notification settings - Fork 867
59 lines (50 loc) · 1.81 KB
/
publish-prerelease-packages.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Publish Package Snapshots
on:
workflow_dispatch:
branches:
- master
push:
branches:
- master
env:
# Among other things, opts out of Turborepo telemetry
# See https://consoledonottrack.com/
DO_NOT_TRACK: '1'
# Enables Turborepo Remote Caching.
TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
jobs:
build-and-publish-snapshots-to-npm:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
uses: ./.github/workflows/actions/install-dependencies
- name: Setup Solana Test Validator
id: start-test-validator
uses: ./.github/workflows/actions/setup-validator
- name: Run Build Step (force)
run: pnpm turbo build --filter=\!@solana/web3.js --force=true
- name: Configure NPM token
run: |
pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish Snapshots
run: |
pnpm changeset pre exit
find packages/* -maxdepth 0 -type d -print0 | \
xargs -t0 -n 1 -I {} \
sh -c 'cd {} && pnpm pkg delete devDependencies'
pnpm changeset version --snapshot preview
pnpm turbo publish-packages --concurrency=100% --filter=\!@solana/web3.js
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PUBLISH_TAG: experimental
- name: Stop Test Validator
if: always() && steps.start-test-validator.outcome == 'success'
run: kill ${{ steps.start-test-validator.outputs.pid }}