-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.44 KB
/
publish.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
name: Publish
on:
push:
branches:
- main
pull_request:
on: [opened, synchronize, reopened, labeled, unlabeled]
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
actions: write
checks: write
statuses: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
publish:
runs-on: ubuntu-22.04
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
- name: Set git user
run: |
git config --global user.email "dev@codecademy.com"
git config --global user.name "codecademydev"
git config --global push.default current
- uses: ./.github/actions/yarn
- run: yarn turbo run build --concurrency=3
- name: Publish
env:
HUSKY_ENABLED: true
GH_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx auto shipit
publish-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/yarn
- run: npx auto pr-check --url "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}?pr=${{github.event.pull_request.number}}"
env:
GH_TOKEN: ${{ secrets.ACTIONS_GITHUB_TOKEN || github.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}