Skip to content

Commit

Permalink
Release Fixes (#2886)
Browse files Browse the repository at this point in the history
* Add bash step and use setup_env action

* Empty commit
  • Loading branch information
atharva-2001 authored Nov 20, 2024
1 parent 6ee870e commit 20b8120
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
- cron: "0 0 * * 0"
workflow_dispatch: # manual trigger

defaults:
run:
shell: bash -l {0}


jobs:
pip_tests:
uses: ./.github/workflows/tests.yml
Expand All @@ -23,31 +28,25 @@ jobs:
repository: tardis-sn/tardis_zenodo
token: ${{ secrets.BOT_TOKEN }}

- name: Checkout setup_env action
uses: actions/checkout@v4
with:
repository: tardis-sn/tardis
sparse-checkout: |
.github/actions/setup_env/action.yml
sparse-checkout-cone-mode: true
path: tardis

- name: Setup environment
uses: ./tardis/.github/actions/setup_env
with:
os-label: "linux-64"

- name: Dump Secret Key
run: echo "$KEY_SECRET_JSON" > key_secret.json
env:
KEY_SECRET_JSON: ${{ secrets.ZENODO_KEY_SECRET_JSON }}

- name: Download Lock File
run: wget -q https://raw.githubusercontent.com/tardis-sn/tardis/master/conda-linux-64.lock
shell: bash

- name: Generate Cache Key
run: |
file_hash=$(cat conda-linux-64.lock | shasum -a 256 | cut -d' ' -f1)
echo "file_hash=$file_hash" >> "${GITHUB_OUTPUT}"
id: cache-environment-key
shell: bash

- uses: mamba-org/setup-micromamba@v1
with:
environment-file: conda-linux-64.lock
cache-environment-key: ${{ steps.cache-environment-key.outputs.file_hash }}
cache-downloads-key: ${{ steps.cache-environment-key.outputs.file_hash }}
environment-name: tardis
cache-environment: true
cache-downloads: true

- name: Run Notebook
run: jupyter nbconvert gather_data.ipynb --to html --execute --ExecutePreprocessor.timeout=6000

Expand All @@ -59,6 +58,7 @@ jobs:
with:
name: zenodo_json
path: .zenodo.json

create:
needs: [pip_tests, zenodo]
runs-on: ubuntu-latest
Expand Down

0 comments on commit 20b8120

Please sign in to comment.