Skip to content

Commit b04b5bd

Browse files
author
emilylo
committed
Do not create release.yml if triggered by GitHub
1 parent ef9f1db commit b04b5bd

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ jobs:
1818
run:
1919
sudo apt update || apt update;
2020
sudo apt-get install -y python3 python3-pip || apt-get install -y python3 python3-pip;
21-
pip3 install virtualenv;
22-
python3 -m virtualenv $GITHUB_WORKSPACE/.venv/;
23-
source $GITHUB_WORKSPACE/.venv/bin/activate && python package.py;
21+
./build.sh
2422
- name: Get the version
2523
id: get_version
2624
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}

build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ else
1212
fi
1313

1414
python package.py
15-
python generate_release_yaml.py > .github/workflows/release.yml
15+
16+
if [[ -z "$GITHUB_REF" ]]; then
17+
echo "Generating release.yml..."
18+
python generate_release_yaml.py > .github/workflows/release.yml
19+
fi

generate_release_yaml.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
run:
2323
sudo apt update || apt update;
2424
sudo apt-get install -y python3 python3-pip || apt-get install -y python3 python3-pip;
25-
pip3 install virtualenv;
26-
python3 -m virtualenv $GITHUB_WORKSPACE/.venv/;
27-
source $GITHUB_WORKSPACE/.venv/bin/activate && python package.py;
25+
./build.sh
2826
- name: Get the version
2927
id: get_version
3028
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}

0 commit comments

Comments
 (0)