-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (70 loc) · 2.2 KB
/
release.yaml
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
70
name: Release
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
env:
PIP_DEFAULT_TIMEOUT: 100
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
jobs:
changesets:
name: Changesets
runs-on: ubuntu-latest
outputs:
should-deploy: ${{ steps.changesets.outputs.hasChangesets == 'false' }}
permissions: write-all
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Install Poetry
run: pipx install poetry
- name: Setup Node.js
uses: actions/[email protected]
with:
cache: yarn
node-version-file: .node-version
- name: Setup Python
uses: actions/[email protected]
with:
cache: poetry
python-version-file: .python-version
- name: Install Node.js dependencies
run: yarn install
- name: Import GPG key
uses: crazy-max/[email protected]
with:
git_commit_gpgsign: true
git_user_signingkey: true
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Setup Git user
run: |
git config --global user.email [email protected]
git config --global user.name org-spear-ai
- name: Build packages
run: yarn turbo run build
- name: Authenticate with NPM
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
- name: Authenticate with GitHub Packages
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: npm config set //npm.pkg.github.com/:_authToken=$GITHUB_TOKEN
- id: changesets
name: Run Changesets — Create a Release Pull Request or merge a Release Pull Request
uses: changesets/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
title: Release 🚀
version: yarn run version
commit: Release 🚀
publish: yarn run publish-packages
setupGitUser: false