-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.08 KB
/
release.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
name: Release
on:
workflow_run:
workflows: ['CI'] # Ensure this matches the name of your CI workflow
types:
- completed
jobs:
release:
if: |
${{ github.ref == 'refs/heads/main' }} &&
${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: 'pnpm'
- run: pnpm install --no-frozen-lockfile
- name: Configure npm for @drivly scope
run: |
echo "@drivly:registry=https://registry.npmjs.org/" >> ~/.npmrc
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}