2222 permissions :
2323 contents : write
2424 pull-requests : write
25- outputs :
26- version : ${{ steps.bump.outputs.version }}
2725 steps :
2826 - name : Checkout sources
2927 uses : actions/checkout@v4
4240 git config user.name "${{ github.actor }}"
4341 git config user.email "${{ github.actor }}@users.noreply.github.com"
4442
45- - name : Get previous released annotated tag
46- id : last-release
47- run : |
48- # Get the latest tag that doesn't have -ea suffix (handles both -ea. and -ea- formats)
49- TAG=$(git tag -l --sort=-version:refname | grep -vE -- '-ea[.-]' | head -n 1)
50- if [ -z "$TAG" ]; then
51- # If no release tag exists, use the base version from package.json
52- BASE_VERSION=$(node -p "require('./package.json').version" | sed -E 's/-ea[.-][0-9]+$//')
53- echo "base-tag=$BASE_VERSION" >> "$GITHUB_OUTPUT"
54- echo "full-tag=$BASE_VERSION" >> "$GITHUB_OUTPUT"
55- else
56- echo "base-tag=$TAG" >> "$GITHUB_OUTPUT"
57- echo "full-tag=$TAG" >> "$GITHUB_OUTPUT"
58- fi
59-
60- - name : Get first tag in current development iteration
61- id : fetch-tag
62- run : |
63- BASE_TAG="${{ steps.last-release.outputs.base-tag }}"
64- # Find the oldest EA tag for this base version (handles both -ea. and -ea- formats)
65- OLDEST_EA_TAG=$(git tag -l --sort=creatordate | grep -E "^${BASE_TAG}-ea[.-]" | head -n 1)
66- if [ -n "$OLDEST_EA_TAG" ]; then
67- echo "oldest-tag=$OLDEST_EA_TAG" >> "$GITHUB_OUTPUT"
68- else
69- echo "oldest-tag=$BASE_TAG" >> "$GITHUB_OUTPUT"
70- fi
71-
7243 - name : Update package with new version
7344 id : bump
7445 run : |
9162 git add package-lock.json
9263 git commit -m "build: release ${{ steps.bump.outputs.version }} [skip ci]"
9364 git push origin "$BRANCH"
65+ echo "$BRANCH" > releasebranch.txt
66+
67+ - uses : actions/upload-artifact@v2
68+ with :
69+ name : releasebranch
70+ path : releasebranch.txt
9471
9572 - name : Create GitHub release tag
9673 uses : softprops/action-gh-release@v1
@@ -111,14 +88,3 @@ jobs:
11188 --head "release/v${{ steps.bump.outputs.version }}"
11289 env :
11390 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
114-
115- trigger-publish :
116- name : Trigger Publish pipeline
117- needs : create-release
118- permissions :
119- contents : write
120- id-token : write
121- uses : ./.github/workflows/publish.yml
122- with :
123- branch : " release/v${{ needs.create-release.outputs.version }}"
124-
0 commit comments