Skip to content

Commit f514224

Browse files
committed
update autorelease
1 parent 315128c commit f514224

File tree

4 files changed

+47
-10
lines changed

4 files changed

+47
-10
lines changed

.github/workflows/autorelease-default-env.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
INSTALL_AUTORELEASE="python -m pip install autorelease==0.2.6"
1+
# Vendored from Autorelease 0.5.1
2+
# Update by updating Autorelease and running `autorelease vendor actions`
3+
INSTALL_AUTORELEASE="python -m pip install autorelease==0.5.1"
24
if [ -f autorelease-env.sh ]; then
35
source autorelease-env.sh
46
fi

.github/workflows/autorelease-deploy.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
name: Autorelease
1+
# Vendored from Autorelease 0.5.1
2+
# Update by updating Autorelease and running `autorelease vendor actions`
3+
name: "Autorelease Deploy"
24
on:
35
release:
46
types: [published]
57

68
jobs:
79
deploy_pypi:
10+
if: ${{ github.repository == 'openpathsampling/openpathsampling-cli' }}
811
runs-on: ubuntu-latest
912
name: "Deploy to PyPI"
1013
steps:
@@ -17,7 +20,11 @@ jobs:
1720
if [ -f "autorelease-env.sh" ]; then
1821
cat autorelease-env.sh >> $GITHUB_ENV
1922
fi
20-
eval $INSTALL_AUTORELEASE
23+
if [ -f "./.autorelease/install-autorelease" ]; then
24+
source ./.autorelease/install-autorelease
25+
else
26+
eval $INSTALL_AUTORELEASE
27+
fi
2128
name: "Install autorelease"
2229
- run: |
2330
python -m pip install twine wheel

.github/workflows/autorelease-gh-rel.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
name: Autorelease
1+
# Vendored from Autorelease 0.5.1
2+
# Update by updating Autorelease and running `autorelease vendor actions`
3+
name: "Autorelease Release"
24
on:
35
push:
46
branches:
7+
# TODO: this should come from yaml conf
58
- stable
69

710
jobs:
811
release-gh:
12+
if: ${{ github.repository == 'openpathsampling/openpathsampling-cli' }}
913
runs-on: ubuntu-latest
1014
name: "Cut release"
1115
steps:
@@ -18,7 +22,11 @@ jobs:
1822
if [ -f "autorelease-env.sh" ]; then
1923
cat autorelease-env.sh >> $GITHUB_ENV
2024
fi
21-
eval $INSTALL_AUTORELEASE
25+
if [ -f "./.autorelease/install-autorelease" ]; then
26+
source ./.autorelease/install-autorelease
27+
else
28+
eval $INSTALL_AUTORELEASE
29+
fi
2230
name: "Install autorelease"
2331
- run: |
2432
VERSION=`python setup.py --version`
@@ -27,3 +35,4 @@ jobs:
2735
autorelease-release --project $PROJECT --version $VERSION --token $AUTORELEASE_TOKEN
2836
env:
2937
AUTORELEASE_TOKEN: ${{ secrets.AUTORELEASE_TOKEN }}
38+
name: "Cut release"

.github/workflows/autorelease-prep.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
name: "Autorelease"
1+
# Vendored from Autorelease 0.5.1
2+
# Update by updating Autorelease and running `autorelease vendor actions`
3+
name: "Autorelease testpypi"
24
on:
35
pull_request:
46
branches:
7+
# TODO: this should come from yaml conf
58
- stable
69

710
defaults:
@@ -10,6 +13,7 @@ defaults:
1013

1114
jobs:
1215
deploy_testpypi:
16+
if: ${{ github.repository == 'openpathsampling/openpathsampling-cli' }}
1317
runs-on: ubuntu-latest
1418
name: "Deployment test"
1519
steps:
@@ -22,7 +26,11 @@ jobs:
2226
if [ -f "autorelease-env.sh" ]; then
2327
cat autorelease-env.sh >> $GITHUB_ENV
2428
fi
25-
eval $INSTALL_AUTORELEASE
29+
if [ -f "./.autorelease/install-autorelease" ]; then
30+
source ./.autorelease/install-autorelease
31+
else
32+
eval $INSTALL_AUTORELEASE
33+
fi
2634
name: "Install autorelease"
2735
- run: |
2836
python -m pip install twine wheel
@@ -41,6 +49,7 @@ jobs:
4149
repository_url: https://test.pypi.org/legacy/
4250
name: "Deploy to testpypi"
4351
test_testpypi:
52+
if: ${{ github.repository == 'openpathsampling/openpathsampling-cli' }}
4453
runs-on: ubuntu-latest
4554
name: "Test deployed"
4655
needs: deploy_testpypi
@@ -54,7 +63,17 @@ jobs:
5463
if [ -f "autorelease-env.sh" ]; then
5564
cat autorelease-env.sh >> $GITHUB_ENV
5665
fi
57-
eval $INSTALL_AUTORELEASE
66+
if [ -f "./.autorelease/install-autorelease" ]; then
67+
source ./.autorelease/install-autorelease
68+
else
69+
eval $INSTALL_AUTORELEASE
70+
fi
5871
name: "Install autorelease"
59-
- run: test-testpypi
60-
72+
- name: "Install testpypi version"
73+
run: install-testpypi
74+
- name: "Test testpypi version"
75+
run: |
76+
if [ -f "autorelease-env.sh" ]; then
77+
cat autorelease-env.sh >> $GITHUB_ENV
78+
fi
79+
test-testpypi

0 commit comments

Comments
 (0)