Skip to content

Commit f120d72

Browse files
committed
Update GHA workflows to remove deprecated features
1 parent 4988655 commit f120d72

File tree

3 files changed

+26
-20
lines changed

3 files changed

+26
-20
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Set update schedule for GitHub Actions
2+
3+
version: 2
4+
updates:
5+
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
# Check for updates to GitHub Actions every week
10+
interval: "weekly"

.github/workflows/main.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
id: check-cmdstan
2626
run: |
2727
if [[ "${{ github.event.inputs.cmdstan-version }}" != "" ]]; then
28-
echo "::set-output name=version::${{ github.event.inputs.cmdstan-version }}"
28+
echo "version=${{ github.event.inputs.cmdstan-version }}" >> $GITHUB_OUTPUT
2929
else
30-
echo "::set-output name=version::$(python -c 'import requests;print(requests.get("https://api.github.com/repos/stan-dev/cmdstan/releases/latest").json()["tag_name"][1:])')"
30+
echo "version=$(python -c 'import requests;print(requests.get("https://api.github.com/repos/stan-dev/cmdstan/releases/latest").json()["tag_name"][1:])')" >> $GITHUB_OUTPUT
3131
fi
3232
outputs:
3333
version: ${{ steps.check-cmdstan.outputs.version }}
@@ -44,10 +44,10 @@ jobs:
4444
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
4545
steps:
4646
- name: Check out github
47-
uses: actions/checkout@v2
47+
uses: actions/checkout@v3
4848

4949
- name: Set up Python ${{ matrix.python-version }}
50-
uses: actions/setup-python@v2
50+
uses: actions/setup-python@v3
5151
with:
5252
python-version: ${{ matrix.python-version }}
5353

@@ -81,15 +81,11 @@ jobs:
8181
- name: Show libraries
8282
run: python -m pip freeze
8383

84-
- name: Get system info
85-
uses: kenchan0130/[email protected]
86-
id: system-info
87-
8884
- name: CmdStan installation cacheing
89-
uses: actions/cache@v2
85+
uses: actions/cache@v3
9086
with:
9187
path: ~/.cmdstan
92-
key: ${{ runner.os }}-${{ steps.system-info.outputs.release }}-cmdstan-${{ needs.get-cmdstan-version.outputs.version }}-${{ hashFiles('**/install_cmdstan.py') }}
88+
key: ${{ runner.os }}-cmdstan-${{ needs.get-cmdstan-version.outputs.version }}-${{ hashFiles('**/install_cmdstan.py') }}
9389

9490
- name: Install CmdStan (Linux, macOS)
9591
if: matrix.os != 'windows-latest'

.github/workflows/release.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
inputs:
66
new_version:
7-
description: 'New version, for example: 0.9.69'
7+
description: 'New version, for example: 0.9.69'
88
required: true
99

1010
jobs:
@@ -18,10 +18,10 @@ jobs:
1818
fail-fast: false
1919
steps:
2020
- name: Check out source code
21-
uses: actions/checkout@v2
22-
21+
uses: actions/checkout@v3
22+
2323
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v2
24+
uses: actions/setup-python@v3
2525
with:
2626
python-version: ${{ matrix.python-version }}
2727

@@ -36,7 +36,7 @@ jobs:
3636
pip install -r requirements.txt
3737
pip install -e .
3838
39-
- name: Install CmdStan
39+
- name: Install CmdStan
4040
run: |
4141
python -m cmdstanpy.install_cmdstan
4242
@@ -50,15 +50,15 @@ jobs:
5050
git checkout -b release/v${{ github.event.inputs.new_version }}
5151
5252
sed -i 's/^__version__ = .*$/__version__ = '\''${{ github.event.inputs.new_version }}'\''/g' cmdstanpy/_version.py
53-
53+
5454
cd docsrc
5555
make github
5656
cd ..
57-
57+
5858
git add .
5959
git commit -m "release/v${{ github.event.inputs.new_version }}: updating version numbers"
6060
git push -u origin release/v${{ github.event.inputs.new_version }}
61-
61+
6262
- name: Merge into develop
6363
run: |
6464
git checkout develop
@@ -78,13 +78,13 @@ jobs:
7878
git pull
7979
git reset --hard v${{ github.event.inputs.new_version }}
8080
git push -f origin master
81-
81+
8282
- name: Build wheel
8383
run: python setup.py sdist bdist_wheel
8484

8585
- name: Install bdist_wheel
8686
run: pip install dist/*.whl
87-
87+
8888
- name: Upload to pypi
8989
if: success()
9090
env:

0 commit comments

Comments
 (0)