|
| 1 | +name: Release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - "v*" |
| 7 | + |
| 8 | +jobs: |
| 9 | + gh_tagged_release: |
| 10 | + name: Create tagged release |
| 11 | + runs-on: ${{ matrix.os }} |
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + matrix: |
| 15 | + poetry-version: [ 1.1.13 ] |
| 16 | + os: [ ubuntu-latest ] |
| 17 | + |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v3 |
| 20 | + - name: Set up Python 3.10 |
| 21 | + uses: actions/setup-python@v3 |
| 22 | + with: |
| 23 | + python-version: "3.10" |
| 24 | + |
| 25 | + - name: Install poetry ${{ matrix.poetry-version }} |
| 26 | + run: | |
| 27 | + python -m ensurepip |
| 28 | + python -m pip install --upgrade pip |
| 29 | + python -m pip install poetry==${{ matrix.poetry-version }} |
| 30 | +
|
| 31 | + - name: Set and build sds-aspect project |
| 32 | + id: SDS_version |
| 33 | + run: | |
| 34 | + cd core/sds-aspect-meta-model-python |
| 35 | + poetry version ${GITHUB_REF/refs\/tags\/v/} |
| 36 | + poetry install |
| 37 | + poetry run download-bamm-release |
| 38 | + poetry build |
| 39 | + echo "SdsVersion=poetry version -s" >> $GITHUB_ENV |
| 40 | + echo "::set-output name=SdsVersion::$(poetry version -s)" |
| 41 | +
|
| 42 | + - name: Create GitHub release |
| 43 | + if: ${{ (!contains( github.ref, 'b' )) }} |
| 44 | + uses: svenstaro/upload-release-action@latest |
| 45 | + with: |
| 46 | + file_glob: true |
| 47 | + overwrite: true |
| 48 | + prerelease: false |
| 49 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 50 | + file: core/sds-aspect-meta-model-python/dist/sds-aspect-meta-model-python-${{steps.SDS_version.outputs.SdsVersion}}.tar.gz |
| 51 | + tag: ${{steps.SDS_version.outputs.SdsVersion}} |
| 52 | + |
| 53 | + - name: Create GitHub release |
| 54 | + if: ${{ (contains( github.ref, 'b' )) }} |
| 55 | + uses: svenstaro/upload-release-action@latest |
| 56 | + with: |
| 57 | + file_glob: true |
| 58 | + overwrite: true |
| 59 | + prerelease: true |
| 60 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 61 | + file: core/sds-aspect-meta-model-python/dist/sds-aspect-meta-model-python-${{steps.SDS_version.outputs.SdsVersion}}.tar.gz |
| 62 | + tag: ${{steps.SDS_version.outputs.SdsVersion}} |
0 commit comments