-
Notifications
You must be signed in to change notification settings - Fork 350
65 lines (63 loc) · 2.56 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Alpha Release
on:
push:
paths-ignore:
- 'CHANGELOG.md'
tags-ignore:
- '**'
branches:
- alpha
jobs:
release-alpha:
name: Alpha Release Gestalt
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: |
contains(github.event.head_commit.message, 'Version bump:') == false && github.repository == 'pinterest/gestalt'
steps:
- name: Set Pre-Release label
id: extract_labels
run: |
echo "::set-output name=labels::["prerelease release"]"
- name: Checkout the repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup npm
env:
NODE_AUTH_TOKEN: ${{ secrets.ALBERTO_NPM_PERSONAL_TOKEN }}
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
- name: Install dependencies
run: yarn install
- name: Setup GitHub access tokens
env:
ALBERTO_GITHUB_PERSONAL_TOKEN: ${{ secrets.ALBERTO_GITHUB_PERSONAL_TOKEN }}
run: |
echo "machine github.com" >> ~/.netrc
echo "login AlbertCarreras" >> ~/.netrc
echo "password $ALBERTO_GITHUB_PERSONAL_TOKEN" >> ~/.netrc
- name: Release Steps
id: pre_release
run: ./scripts/releaseSteps.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LABELS: ${{ steps.extract_labels.outputs.labels }}
- name: Get Github Workflow Version
run: echo ${{ steps.pre_release.outputs.VERSION }}
- name: Publish Alpha to npm
run: |
cd packages/gestalt-design-tokens
yarn publish --registry=https://registry.npmjs.org --no-git-tag-version --new-version ${{ steps.pre_release.outputs.VERSION }} --tag alpha
cd ../gestalt
yarn publish --registry=https://registry.npmjs.org --no-git-tag-version --new-version ${{ steps.pre_release.outputs.VERSION }} --tag alpha
cd ../gestalt-charts
yarn publish --registry=https://registry.npmjs.org --no-git-tag-version --new-version ${{ steps.pre_release.outputs.VERSION }} --tag alpha
cd ../gestalt-datepicker
yarn publish --registry=https://registry.npmjs.org --no-git-tag-version --new-version ${{ steps.pre_release.outputs.VERSION }} --tag alpha
cd ../eslint-plugin-gestalt
yarn publish --registry=https://registry.npmjs.org --no-git-tag-version --new-version ${{ steps.pre_release.outputs.VERSION }} --tag alpha