From 5c90622573a825f10b4ad2f323b475afb0815e5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ezequiel=20P=C3=A1ssaro?= Date: Fri, 17 Jan 2020 20:21:02 -0300 Subject: [PATCH] Add YML file for release version (#1005) --- .github/workflows/release.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000000..75c88da5f50 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +name: Release a new TARDIS version + +on: + push: + branches: + - master + +jobs: + release: + + name: Main job + runs-on: ubuntu-latest + steps: + # Every step starts with '-' + - uses: actions/checkout@v2 + + - name: Create TARDIS environment + uses: goanpeca/setup-miniconda@v1.0.2 + with: + auto-update-conda: True + activate-environment: tardis + environment-file: tardis_env3.yml + auto-activate-base: False + + - name: Build and install TARDIS + shell: bash -l {0} + run: | + python setup.py install + + - name: Get TARDIS version number + shell: bash -l {0} + run: | + # This is the only way I found to share variables across steps + echo "::set-env name=VERSION::$(python -c 'import tardis; print(tardis.__version__)')" + + - name: Automatic Releases + uses: marvinpinto/action-automatic-releases@v0.2.2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + automatic_release_tag: ${{ env.VERSION }} + prerelease: True + title: ${{ env.VERSION }}