Skip to content

Commit 039453c

Browse files
Update github-release.yml
1 parent 0c36f33 commit 039453c

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

.github/workflows/github-release.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,17 @@ jobs:
1919
os: [ubuntu-latest, macos-13]
2020
runs-on: ${{ matrix.os }}
2121

22+
outputs:
23+
isis_version: ${{ steps.set_version.outputs.isis_version }}
24+
built_package: ${{ steps.build_release.outputs.built_package }}
25+
2226
steps:
2327
- uses: actions/checkout@v4
2428

29+
- name: Set ISIS_VERSION
30+
id: set_version
31+
run: echo "isis_version=${{ github.event.release.tag_name || github.ref_name }}" >> "$GITHUB_OUTPUT"
32+
2533
- name: Set up Mambaforge
2634
uses: conda-incubator/setup-miniconda@v3
2735
with:
@@ -31,7 +39,7 @@ jobs:
3139

3240
- name: Build Release
3341
env:
34-
ISIS_VERSION: ${{ github.event.release.tag_name || github.ref_name }}
42+
ISIS_VERSION: ${{ steps.set_version.outputs.isis_version }}
3543
run: |
3644
mamba install conda-build anaconda-client
3745
git fetch origin
@@ -59,13 +67,8 @@ jobs:
5967
6068
BUILT_DIR=$(conda info --base)/conda-bld
6169
BUILT_PACKAGE=$(find "$BUILT_DIR" -name "isis-${ISIS_VERSION}-*.conda" | head -n1)
62-
echo "$BUILT_PACKAGE" > built_package.txt
70+
echo "built_package=$BUILT_PACKAGE" >> "$GITHUB_OUTPUT"
6371
64-
- name: Upload artifact
65-
uses: actions/upload-artifact@v4
66-
with:
67-
name: built-package-${{ matrix.os }}
68-
path: built_package.txt
6972
7073
test:
7174
runs-on: ${{ matrix.os }}
@@ -80,7 +83,7 @@ jobs:
8083
- os: macos-13
8184
python: "3.12"
8285
env:
83-
ISIS_VERSION: ${{ github.event.release.tag_name || github.ref_name }}
86+
ISIS_VERSION: ${{ needs.build.outputs.isis_version }}
8487

8588
steps:
8689
- name: Set up Miniforge
@@ -91,7 +94,7 @@ jobs:
9194
activate-environment: isis-test
9295
use-mamba: true
9396
mamba-version: "1.5.3"
94-
python-version: ${{ matrix.python-version }}
97+
python-version: ${{ matrix.python }}
9598

9699
- name: Conda install and test spiceinit
97100
run: |
@@ -122,15 +125,15 @@ jobs:
122125
runs-on: ubuntu-latest
123126
needs: test
124127
env:
125-
ISIS_VERSION: ${{ github.event.release.tag_name || github.ref_name }}
128+
ISIS_VERSION: ${{ needs.build.outputs.isis_version }}
126129
if: |
127-
${{
128-
success() &&
129-
!contains(env.ISIS_VERSION, '_RC') &&
130-
!contains(env.ISIS_VERSION, '_LTS')
131-
}}
130+
success() &&
131+
!contains(needs.build.outputs.isis_version, '_RC') &&
132+
!contains(needs.build.outputs.isis_version, '_LTS')
132133
steps:
133134
- uses: actions/checkout@v4
135+
with:
136+
submodules: recursive
134137

135138
- name: Set up Conda for doc build
136139
uses: conda-incubator/setup-miniconda@v3
@@ -151,20 +154,20 @@ jobs:
151154
ninja docs
152155
153156
- name: Set AWS credentials for upload
154-
uses: aws-actions/configure-aws-credentials@0e613a0980cbf65ed5b322eb7a1e075d28913a83
157+
uses: aws-actions/configure-aws-credentials@v4
155158
with:
156159
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
157160
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
158161
aws-region: us-west-2
159162

160163
- name: Upload to S3
161164
run: |
162-
cd docs
165+
cd /home/runner/work/ISIS3/ISIS3/build/docs
163166
if [ -d "${ISIS_VERSION}" ]; then
164167
cd "${ISIS_VERSION}"
165168
echo "Uploading documentation to S3..."
166169
aws s3 sync ./ s3://asc-public-docs/isis-site/${ISIS_VERSION}/ --delete
167170
else
168171
echo "Error: docs/${ISIS_VERSION} directory not found!"
169172
exit 1
170-
fi
173+
fi

0 commit comments

Comments
 (0)