Skip to content

Commit 335178a

Browse files
committed
fix: version before build
1 parent fa7541c commit 335178a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,17 @@ jobs:
5757
# run tests
5858
- name: Run tests
5959
run: composer run-script test
60+
# version
61+
- name: Previous release # required for changelog generation
62+
id: previous_release
63+
run: echo "tag=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)" >> $GITHUB_OUTPUT
64+
- name: Current version
65+
id: version
66+
run: |
67+
echo "Version: ${GITHUB_REF#refs/tags/}"
68+
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
69+
echo "${GITHUB_REF#refs/tags/}" > VERSION
70+
export COMPOSER_ROOT_VERSION=${GITHUB_REF#refs/tags/}
6071
# run build and test Phar file
6172
- name: Build `cecil.phar` binary
6273
run: composer run-script build
@@ -118,17 +129,6 @@ jobs:
118129
path: |
119130
dist/cecil.*
120131
if-no-files-found: error
121-
# version
122-
- name: Previous release # required for changelog generation
123-
id: previous_release
124-
run: echo "tag=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)" >> $GITHUB_OUTPUT
125-
- name: Current version
126-
id: version
127-
run: |
128-
echo "Version: ${GITHUB_REF#refs/tags/}"
129-
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
130-
echo "${GITHUB_REF#refs/tags/}" > VERSION
131-
export COMPOSER_ROOT_VERSION=${GITHUB_REF#refs/tags/}
132132
# summary
133133
- name: Summary
134134
run: |

0 commit comments

Comments
 (0)