-
Notifications
You must be signed in to change notification settings - Fork 17
54 lines (54 loc) · 1.44 KB
/
Copy pathpublish.yml
File metadata and controls
54 lines (54 loc) · 1.44 KB
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
name: Automatic Publish
on:
push:
branches:
- master
tags-ignore:
- "**"
paths-ignore:
- "**/*.md"
- LICENSE
- "**/*.gitignore"
- .editorconfig
- docs/**
pull_request: null
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup node
uses: actions/setup-node@v6
with:
node-version-file: ".node-version"
check-latest: true
cache: "pnpm"
registry-url: "https://registry.npmjs.org"
- run: pnpm config set --location=global minimumReleaseAge 0
- run: pnpm install
- run: pnpm -F=foxact run test
- run: pnpm -F=foxact run build
- name: Publish
run: |
if git log -1 --pretty=%B | grep "^release: [0-9]\+\.[0-9]\+\.[0-9]\+$";
then
cd packages/foxact/dist
pnpm publish --provenance --access public
cd ../../..
elif git log -1 --pretty=%B | grep "^release: [0-9]\+\.[0-9]\+\.[0-9]\+";
then
cd packages/foxact/dist
pnpm publish --tag next --provenance --access public
cd ../../..
else
echo "Not a release, skipping publish"
fi
env:
NPM_CONFIG_PROVENANCE: true