Skip to content

Commit 0a1cf75

Browse files
committed
Update CI
1 parent b2c0fa9 commit 0a1cf75

2 files changed

Lines changed: 12 additions & 16 deletions

File tree

.github/workflows/build.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
prepare:
1414
name: Prepare env & label
1515
runs-on: ubuntu-latest
16+
outputs:
17+
get_current_tag: ${{ steps.set_current_tag_id.outputs.current_tag }}
1618
steps:
1719

1820
- name: Checkout code
@@ -37,13 +39,7 @@ jobs:
3739

3840
- name: Set tag version to output
3941
id: set_current_tag_id
40-
run: |
41-
echo "CURRENT_TAG=${{ steps.tag_version.outputs.new_tag }}"
42-
echo "CURRENT_TAG=${{ steps.tag_version.outputs.new_tag }}" >> $GITHUB_OUTPUT
43-
44-
- name: Echo env var
45-
run: |
46-
echo "${{ env.CURRENT_TAG }}"
42+
run: echo "::set-output name=current_tag::${{ steps.tag_version.outputs.new_tag }}"
4743

4844
- name: Notify if failure
4945
if: ${{ failure() }}
@@ -89,7 +85,6 @@ jobs:
8985
run: |
9086
python -m pip install --upgrade pip
9187
pip install -r requirements.txt
92-
echo "${{ needs.prepare.outputs.CURRENT_TAG }}"
9388
9489
- name: Build with pyinstaller for ${{ matrix.TARGET }}
9590
run: ${{ matrix.CMD_BUILD }}
@@ -131,7 +126,7 @@ jobs:
131126
132127
<b>WorkFlows:</b> <a href="https://github.com/${{ github.repository }}/actions">ActionsList</a>
133128
134-
Commit with tag: ${{ needs.prepare.outputs.CURRENT_TAG }}
129+
Commit with tag: ${{ needs.prepare.outputs.get_current_tag }}
135130
136131
Repository: ${{ github.repository }}
137132

.github/workflows/release.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: Set tag version to output
4141
id: set_current_tag_id
42-
run: echo "CURRENT_TAG=${{ steps.tag_version.outputs.new_tag }}" >> $GITHUB_ENV
42+
run: echo "::set-output name=current_tag::${{ steps.tag_version.outputs.new_tag }}"
4343

4444
- name: Notify if failure
4545
if: ${{ failure() }}
@@ -57,6 +57,8 @@ jobs:
5757
name: Create Release
5858
runs-on: ubuntu-latest
5959
needs: prepare
60+
outputs:
61+
get_release_url: ${{ steps.set_release_url.outputs.release_url }}
6062
steps:
6163

6264
- name: Build Changelog
@@ -74,12 +76,12 @@ jobs:
7476
GITHUB_TOKEN: ${{ secrets.REPOS_TOKEN }}
7577
with:
7678
tag_name: ${{ needs.prepare.outputs.get_current_tag }}
77-
release_name: Release ${{ needs.prepare.outputs.CURRENT_TAG }}
79+
release_name: Release ${{ needs.prepare.outputs.get_current_tag }}
7880
body: ${{ steps.github_release.outputs.changelog }}
7981

8082
- name: Set Release URL
8183
id: set_release_url
82-
run: echo "RELEASE_URL=${{ steps.create_release.outputs.upload_url }}" >> $GITHUB_ENV
84+
run: echo "::set-output name=release_url::${{ steps.create_release.outputs.upload_url }}"
8385

8486
- name: Notify if failure
8587
if: ${{ failure() }}
@@ -126,7 +128,6 @@ jobs:
126128
run: |
127129
python -m pip install --upgrade pip
128130
pip install -r requirements.txt
129-
echo "${{ env.RELEASE_URL }}"
130131
131132
- name: Build with pyinstaller for ${{ matrix.TARGET }}
132133
run: ${{ matrix.CMD_BUILD }}
@@ -144,7 +145,7 @@ jobs:
144145
env:
145146
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
146147
with:
147-
upload_url: ${{ env.RELEASE_URL }}
148+
upload_url: ${{ needs.release.outputs.get_release_url }}
148149
asset_path: ./dist/${{ matrix.OUT_FILE_NAME }}
149150
asset_name: ${{ matrix.OUT_FILE_NAME }}
150151
asset_content_type: ${{ matrix.ASSET_MIME }}
@@ -179,12 +180,12 @@ jobs:
179180
180181
<b>WorkFlows:</b> <a href="https://github.com/${{ github.repository }}/actions">ActionsList</a>
181182
182-
Commit with tag: ${{ env.CURRENT_TAG }}
183+
Commit with tag: ${{ needs.prepare.outputs.get_current_tag }}
183184
184185
Repository: ${{ github.repository }}
185186
186187
Branch: ${{ github.ref }}
187188
188-
<b>Release URL:</b> https://github.com/${{ github.repository }}/releases/tag/${{ env.CURRENT_TAG }}
189+
<b>Release URL:</b> https://github.com/${{ github.repository }}/releases/tag/${{ needs.prepare.outputs.get_current_tag }}
189190
190191
See changes: https://github.com/${{ github.repository }}/commit/${{ github.sha }}

0 commit comments

Comments
 (0)