66name : release-please
77
88jobs :
9- release-pr :
10- runs-on : ubuntu-latest
11- environment : ci
12- env :
13- CODEARTIFACT_REGISTRY_SERVER : ${{ vars.CODEARTIFACT_REGISTRY_SERVER }}
14- steps :
15- - uses : actions/setup-node@v6
16- with :
17- node-version : ' 24.11.0'
18- - uses : google-github-actions/release-please-action@v3
19- id : release-please
20- with :
21- release-type : node
22- package-name : ' @appfolio/react-gears'
23- changelog-types : ' [{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false},{"type":"refactor","section":"Miscellaneous","hidden":false}]'
24- command : release-pr
25- - uses : actions/github-script@v5
26- if : ${{ steps.release-please.outputs.pr }}
27- id : extract-branch
28- env :
29- PR_NUM : ${{ steps.release-please.outputs.pr }}
30- with :
31- result-encoding : string
32- script : return JSON.parse(process.env.PR_NUM).headBranchName
33- - uses : actions/checkout@v5
34- if : ${{ steps.release-please.outputs.pr }}
35- with :
36- ref : ${{ steps.extract-branch.outputs.result }}
37- - uses : ./.github/actions/prep-secure-registries
38- if : ${{ steps.release-please.outputs.pr }}
39- with :
40- aws-access-key-id : ${{ secrets.SHARED_CODEARTIFACT_AWS_KEY_ID }}
41- aws-secret-access-key : ${{ secrets.SHARED_CODEARTIFACT_AWS_SECRET_KEY }}
42- - run : yarn install --immutable
43- if : ${{ steps.release-please.outputs.pr }}
44- - run : yarn docs
45- if : ${{ steps.release-please.outputs.pr }}
46- - uses : stefanzweifel/git-auto-commit-action@v4
47- if : ${{ steps.release-please.outputs.pr }}
48- with :
49- commit_message : ' docs: update documentation for the latest release'
50-
51- release :
9+ release-github :
5210 runs-on : ubuntu-latest
5311 environment : ci
5412 env :
@@ -75,14 +33,36 @@ jobs:
7533 if : ${{ steps.release.outputs.release_created }}
7634 - run : yarn dist
7735 if : ${{ steps.release.outputs.release_created }}
36+ - name : Upload artifacts
37+ uses : actions/upload-artifact@v4
38+ if : ${{ steps.release.outputs.release_created }}
39+ with :
40+ name : dist
41+ path : dist/
42+ retention-days : 1
43+ if-no-files-found : error
7844 - name : Publish to GitHub
7945 run : |
8046 npm config set registry https://npm.pkg.github.com
8147 npm config set //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}
8248 npm publish
8349 if : ${{ steps.release.outputs.release_created }}
50+
51+ release-public :
52+ runs-on : ubuntu-latest
53+ needs : release-github
54+ env :
55+ YARN_RC_FILENAME : .yarnrc-public.yml
56+ steps :
57+ - uses : actions/checkout@v5
58+ - uses : actions/setup-node@v6
59+ with :
60+ node-version-file : ' .tool-versions'
61+ - name : Download dist artifacts
62+ uses : actions/download-artifact@v4
63+ with :
64+ name : dist
8465 - name : Publish to npm
8566 run : |
8667 npm config set registry https://registry.npmjs.org
8768 npm publish --access public
88- if : ${{ steps.release.outputs.release_created }}
0 commit comments