-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (51 loc) · 1.41 KB
/
autopublish.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: Release
on:
workflow_dispatch:
push:
paths:
- '.changeset/**'
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
test:
name: Test
uses: ./.github/workflows/test.yml
strategy:
fail-fast: false
max-parallel: 10
matrix:
os: [ubuntu-latest, macos-latest]
with:
os: ${{ matrix.os }}
secrets:
TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }}
TEST_PUBLIC_KEY: ${{ secrets.TEST_PUBLIC_KEY }}
release:
needs: test
name: Release
runs-on: ubuntu-latest
env:
MONGOMS_DISABLE_POSTINSTALL: true
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- uses: cardinalby/export-env-action@v2
with:
envFile: .env.github
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- run: HUSKY=0 bun install --ignore-scripts
env:
HUSKY: 0
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: bun run changeset-release
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}