Skip to content

Commit 85d91df

Browse files
fischermoseleywhitequark
authored andcommitted
CI: properly set release name and tag
1 parent d330a88 commit 85d91df

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,16 @@ jobs:
7373
permissions:
7474
id-token: write
7575
contents: write
76+
outputs:
77+
tag: ${{ steps.tag.outputs.tag }}
78+
version: ${{ steps.tag.outputs.version }}
7679
steps:
7780
- name: Check out source code
7881
uses: actions/checkout@v4
7982
with:
8083
fetch-depth: 0
8184
- name: Tag release
85+
id: tag
8286
run: |
8387
COMMIT_MSG=$(git show -s --format=%s)
8488
LAST_TAG=$(git tag -l "v0.*.*" --sort=-v:refname | head -n 1)
@@ -103,6 +107,8 @@ jobs:
103107
fi
104108
105109
git tag "$NEW_TAG"
110+
echo "tag=$NEW_TAG" >>$GITHUB_OUTPUT
111+
echo "version=${NEW_TAG#v}" >>$GITHUB_OUTPUT
106112
- name: Build package
107113
run: |
108114
pip install build
@@ -131,16 +137,10 @@ jobs:
131137
permissions:
132138
contents: write
133139
steps:
134-
- name: Determine release metadata
135-
id: metadata
136-
env:
137-
REF_NAME: ${{ github.ref_name }}
138-
run: |
139-
echo name=${REF_NAME/v/} >>$GITHUB_OUTPUT
140140
- name: Create release
141141
uses: comnoco/create-release-action@v2
142142
env:
143143
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144144
with:
145-
tag_name: ${{ github.ref_name }}
146-
release_name: ${{ steps.metadata.outputs.name }}
145+
tag_name: ${{ needs.publish-package.outputs.tag }}
146+
release_name: ${{ needs.publish-package.outputs.version }}

0 commit comments

Comments
 (0)