|
10 | 10 | workflow_dispatch: |
11 | 11 |
|
12 | 12 | 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 | + |
13 | 31 | # This job set environment matrix with respect to production release and nightly release. |
14 | 32 | matrix_prep: |
15 | 33 | runs-on: ubuntu-latest |
| 34 | + needs: add_version_to_database |
16 | 35 | outputs: |
17 | 36 | matrix: ${{ steps.set-matrix.outputs.matrix }} |
18 | 37 | matrix_osx: ${{ steps.set-matrix.outputs.matrix_osx }} |
|
29 | 48 | [ -z "${{ github.event.action }}" ] || matrix_osx="[{\"name\":\"taichi\",\"python\":\"3.8\"},{\"name\":\"taichi\",\"python\":\"3.9\"}]" |
30 | 49 | echo ::set-output name=matrix_osx::{\"include\":$(echo $matrix_osx)}\" |
31 | 50 |
|
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 | | - |
51 | 51 | build_and_upload_linux: |
52 | 52 | name: Build and Upload (linux only) |
53 | | - needs: add_version_to_database |
| 53 | + needs: matrix_prep |
54 | 54 | strategy: |
55 | 55 | fail-fast: false |
56 | 56 | matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }} |
|
0 commit comments