-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (51 loc) · 2.07 KB
/
changesets.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
name: Changesets
on:
push:
branches:
- main
jobs:
changesets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- id: changesets
uses: changesets/action@v1
with:
publish: pnpm -r publish
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
#- name: DEBUG Emulate changesets publish action
# id: changesets
# run: |
# pnpm -r coverage
# data='[{"name": "@macropygia/vite-plugin-imagemin-cache", "version": "0.0.0"}, {"name": "@macropygia/vite-plugin-pug-static", "version": "0.0.0"}]'
# echo "::set-output name=publishedPackages::$data"
# echo "::set-output name=published::true"
# Waiting for pnpm support for changesets
# - name: DEBUG / Show changesets outputs
# run: |
# echo ${{ steps.changesets.outputs.published }}
# echo ${{ steps.changesets.outputs.publishedPackages }}
# - name: Convert publishedPackages to comma separated string using jq
# id: jq
# if: steps.changesets.outputs.published == 'true'
# run: |
# flags=`echo '${{ steps.changesets.outputs.publishedPackages }}' | jq '.[].name | split("/") | .[1]' | jq -s -j 'join(",")'`
# echo "::set-output name=codecovFlags::$flags"
# files=`echo '${{ steps.changesets.outputs.publishedPackages }}' | jq '.[].name | split("/") | .[1]' | jq -s -j 'map("packages/" + . + "/coverage/coverage-final.json") | join(",")'`
# echo "::set-output name=codecovFiles::$files"
# - name: Upload coverage to Codecov
# if: steps.changesets.outputs.published == 'true'
# uses: codecov/codecov-action@v3
# with:
# flags: ${{ steps.jq.outputs.codecovFlags }}
# files: ${{ steps.jq.outputs.codecovFiles }}
# # verbose: true
# # dry_run: true