-
Notifications
You must be signed in to change notification settings - Fork 133
69 lines (57 loc) · 2.09 KB
/
publish-package.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
66
67
68
69
name: Publish new Package
# workflow dispatch requires a maintainer to go to the Actions tab and manually trigger the workflow
on:
workflow_dispatch:
inputs:
publish:
description: "Flag to publish new package"
required: true
default: false
type: boolean
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false
# If we ever migrate this to not be manual, we HAVE to check that the commit
# it is running against DOES NOT contain [skip-ci] in the commit message
jobs:
build_and_test_deploy:
name: Build and Publish
runs-on: ubuntu-latest
# Needed for Publishing
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.ALCHEMY_BOT_PAT }}
fetch-depth: "0"
submodules: "recursive"
- name: Set up foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Setup Node
uses: ./.github/actions/setup-node
- name: Set Github User Details
run: |
git config --global user.name "Alchemy Bot"
git config --global user.email "[email protected]"
- name: Set NPM Permissions
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
- name: Build all packages
run: yarn build:dev
# Lerna publish will, compute the new version, update files, run precommit hooks, tag, publish, and push change log
- name: Publish using Lerna
if: inputs.publish
env:
API_KEY: ${{ secrets.API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: yarn lerna publish --conventional-commits --no-private --yes --no-verify-access