...only dev and tag #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish library in (pre-)release | |
on: | |
push: | |
branches: [ dev ] | |
tags: [ 'v*' ] | |
jobs: | |
build: | |
name: Make library | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
make install-dev | |
- name: Build | |
run: | | |
cb_fetch_data library/DATA_SOURCES.yml -o library.h5 | |
- name: Upload pre-release version | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: library.h5 | |
asset_name: latest_library.h5 | |
tag: latest | |
overwrite: true | |
body: "Pre-release library" | |
- name: Upload release version | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: library.h5 | |
asset_name: library_${{ github.ref_name }}.h5 | |
tag: ${{ github.ref_name }} | |
overwrite: true | |
body: "Stable release" |