@@ -11,10 +11,8 @@ concurrency:
1111 cancel-in-progress : true
1212
1313env :
14- REGISTRY : docker.io
15- IMAGE_OWNER : trueberryless
1614 IMAGE_NAME : starlight-automatic-overview-pages
17- NODE_VERSION : 20
15+ NODE_VERSION : 24.10.0
1816
1917jobs :
2018 changes :
2422 starlight-automatic-overview-pages : ${{ steps.filter.outputs.starlight-automatic-overview-pages }}
2523 steps :
2624 - name : Check out the repo
27- uses : actions/checkout@v4
25+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
26+ with :
27+ persist-credentials : false
2828
29- - uses : dorny/paths-filter@v3
29+ - uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
3030 id : filter
3131 with :
3232 filters : |
@@ -44,19 +44,21 @@ jobs:
4444 steps :
4545 - name : Generate GitHub App token
4646 id : generate_token
47- 47+ uses : tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
4848 with :
4949 app_id : ${{ secrets.BOT_APP_ID }}
5050 private_key : ${{ secrets.BOT_PRIVATE_KEY }}
5151
5252 - name : Checkout Repo
53- uses : actions/checkout@v4
53+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
54+ with :
55+ persist-credentials : false
5456
5557 - name : Setup PNPM
56- uses : pnpm/action-setup@v3
58+ uses : pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
5759
5860 - name : Setup Node
59- uses : actions/setup-node@v4
61+ uses : actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
6062 with :
6163 node-version : ${{ env.NODE_VERSION }}
6264 cache : " pnpm"
@@ -66,13 +68,21 @@ jobs:
6668
6769 - name : Create Release Pull Request
6870 id : changesets
69- uses : changesets/action@v1
71+ uses : changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # v1.5.3
7072 with :
71- commit : " [ci] release"
72- title : " [ci] release"
73+ commit : " ci: release"
74+ title : " ci: release [skip netlify] "
7375 env :
7476 GITHUB_TOKEN : ${{ steps.generate_token.outputs.token }}
75- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
77+
78+ - name : Get published version
79+ if : steps.changesets.outputs.hasChangesets == 'true'
80+ run : |
81+ git checkout changeset-release/main
82+ VERSION=$(node -p "require('./packages/starlight-automatic-overview-pages/package.json').version")
83+ NAME=$(node -p "require('./packages/starlight-automatic-overview-pages/package.json').name")
84+ git commit --amend -m "ci: release $NAME v$VERSION" --no-edit
85+ git push origin changeset-release/main:changeset-release/main --force
7686
7787 image-tag :
7888 name : Image Tag
8191 IMAGE_TAG : ${{ env.IMAGE_TAG }}
8292 steps :
8393 - name : Check out the repo
84- uses : actions/checkout@v4
94+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
95+ with :
96+ persist-credentials : false
8597
8698 - name : Read version from package.json
8799 id : get_version
@@ -93,25 +105,27 @@ jobs:
93105 needs : [changes, changesets, image-tag]
94106 if : >
95107 (
96- needs.changesets.outputs.hasChangesets == 'false' &&
108+ needs.changesets.outputs.hasChangesets == 'false' &&
97109 (
98- contains(github.event.head_commit.message, 'deploy') ||
99- contains(github.event.head_commit.message, '[ci] release')
110+ contains(github.event.head_commit.message, 'deploy') ||
111+ contains(github.event.head_commit.message, 'release')
100112 )
101- ) ||
113+ ) ||
102114 github.event_name == 'workflow_dispatch'
103115 runs-on : ubuntu-latest
104116 permissions :
105117 contents : write
106118 id-token : write
107119 steps :
108- - uses : actions/checkout@v4
120+ - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
121+ with :
122+ persist-credentials : false
109123
110124 - name : Setup PNPM
111- uses : pnpm/action-setup@v3
125+ uses : pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
112126
113127 - name : Setup Node
114- uses : actions/setup-node@v4
128+ uses : actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
115129 with :
116130 node-version : ${{ env.NODE_VERSION }}
117131 cache : " pnpm"
@@ -122,9 +136,7 @@ jobs:
122136
123137 - run : |
124138 cd packages/starlight-automatic-overview-pages
125- npm publish --provenance --access public
126- env:
127- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
139+ npm publish --access public
128140
129141 release :
130142 name : Release
@@ -134,10 +146,12 @@ jobs:
134146 contents : write
135147 steps :
136148 - name : Check out the repo
137- uses : actions/checkout@v4
149+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
150+ with :
151+ persist-credentials : false
138152
139153 - id : extract-changelog
140- 154+ uses : sean0x42/markdown-extract@7b185cbe85263116bbf741e739e7198ba86465dc # v2.1.0
141155 with :
142156 file : packages/starlight-automatic-overview-pages/CHANGELOG.md
143157 pattern : ${{ needs.image-tag.outputs.IMAGE_TAG }}
@@ -163,7 +177,7 @@ jobs:
163177 if : env.RELEASE_SKIPPED == 'false'
164178 env :
165179 DISCORD_WEBHOOK : ${{ secrets.DISCORD_WEBHOOK_URL }}
166- uses : Ilshidur/action-discord@0.3.2
180+ uses : Ilshidur/action-discord@d2594079a10f1d6739ee50a2471f0ca57418b554 # 0.4.0
167181 with :
168182 args : |
169183 # ${{ env.IMAGE_NAME }}@${{ needs.image-tag.outputs.IMAGE_TAG }}
0 commit comments