Skip to content

Commit d1cdb0e

Browse files
authored
Update release.yml
1 parent 0f14af8 commit d1cdb0e

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,28 @@ on:
1010
workflow_dispatch:
1111

1212
jobs:
13+
add_version_to_database:
14+
name: Add version to database
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: set tag
20+
id: tag
21+
run: echo ::set-output name=version::${GITHUB_REF#refs/*/}
22+
23+
- name: Save new version
24+
run: |
25+
[ -z "${{ github.event.action }}" ] || python3 misc/save_new_version.py
26+
env:
27+
RELEASE_VERSION: ${{ steps.tag.outputs.version }}
28+
USERNAME: ${{ secrets.METADATA_USERNAME }}
29+
PASSWORD: ${{ secrets.METADATA_PASSWORD }}
30+
1331
# This job set environment matrix with respect to production release and nightly release.
1432
matrix_prep:
1533
runs-on: ubuntu-latest
34+
needs: add_version_to_database
1635
outputs:
1736
matrix: ${{ steps.set-matrix.outputs.matrix }}
1837
matrix_osx: ${{ steps.set-matrix.outputs.matrix_osx }}
@@ -29,28 +48,9 @@ jobs:
2948
[ -z "${{ github.event.action }}" ] || matrix_osx="[{\"name\":\"taichi\",\"python\":\"3.8\"},{\"name\":\"taichi\",\"python\":\"3.9\"}]"
3049
echo ::set-output name=matrix_osx::{\"include\":$(echo $matrix_osx)}\"
3150
32-
add_version_to_database:
33-
name: Add version to database
34-
needs: matrix_prep
35-
runs-on: ubuntu-latest
36-
steps:
37-
- uses: actions/checkout@v2
38-
39-
- name: set tag
40-
id: tag
41-
run: echo ::set-output name=version::${GITHUB_REF#refs/*/}
42-
43-
- name: Save new version
44-
run: |
45-
[ -z "${{ github.event.action }}" ] || python3 misc/save_new_version.py
46-
env:
47-
RELEASE_VERSION: ${{ steps.tag.outputs.version }}
48-
USERNAME: ${{ secrets.METADATA_USERNAME }}
49-
PASSWORD: ${{ secrets.METADATA_PASSWORD }}
50-
5151
build_and_upload_linux:
5252
name: Build and Upload (linux only)
53-
needs: add_version_to_database
53+
needs: matrix_prep
5454
strategy:
5555
fail-fast: false
5656
matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }}

0 commit comments

Comments
 (0)