File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11name : Release
22
33on :
4- release :
5- types : [published]
4+ push :
5+ branches : [main]
6+ tags :
7+ - ' v*'
68
79permissions :
810 contents : read
@@ -14,7 +16,7 @@ concurrency:
1416
1517env :
1618 CI : true
17- NODE_VERSION : 22
19+ NODE_VERSION : 24
1820
1921jobs :
2022 build :
2325 steps :
2426 - uses : actions/checkout@v4
2527
28+ - name : Resolve version
29+ run : |
30+ SHA_SHORT=$(git rev-parse --short HEAD)
31+ echo "SHA_SHORT=$SHA_SHORT" >> $GITHUB_ENV
32+
33+ if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
34+ VERSION=${GITHUB_REF#refs/tags/v}
35+ else
36+ VERSION=0.0.0-insiders.$SHA_SHORT
37+ fi
38+
39+ echo "VERSION=$VERSION" >> $GITHUB_ENV
40+
2641 - name : Install pnpm
2742 uses : pnpm/action-setup@v4
2843
@@ -36,17 +51,19 @@ jobs:
3651 - name : Install dependencies
3752 run : pnpm install
3853
54+ - name : Calculate environment variables
55+ run : |
56+ echo "RELEASE_CHANNEL=$(node ./scripts/release-channel.js $VERSION)" >> $GITHUB_ENV
57+
58+ - name : Version package for insiders release
59+ if : github.ref_type != 'tag'
60+ run : pnpm version ${{ env.VERSION }} --force --no-git-tag-version
61+
3962 - name : Build Prettier Plugin
4063 run : pnpm run build
4164
4265 - name : Test
4366 run : pnpm run test
4467
45- - name : Calculate environment variables
46- run : |
47- echo "RELEASE_CHANNEL=$(pnpm run release-channel --silent)" >> $GITHUB_ENV
48-
4968 - name : Publish
5069 run : pnpm publish --provenance --tag ${{ env.RELEASE_CHANNEL }} --no-git-checks
51- env :
52- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments