Skip to content

Commit c9dfd70

Browse files
committed
main: Move release script to standalone script
1 parent 7f457dc commit c9dfd70

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,4 @@ jobs:
1212
- name: Run release
1313
env:
1414
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
15-
run: |
16-
tag=$(echo $REF | cut -d'/' -f3-)
17-
echo "Releasing version ${tag}"
18-
docker build . \
19-
--target=release_test \
20-
--build-arg RELEASE_VERSION=${tag} \
21-
--build-arg PYPI_TOKEN=${PYPI_TOKEN}
15+
run: REF="${{ github.ref }}" ./ci/release.sh

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ RUN ./ci/publish.sh
4646
FROM base as release_test
4747
ARG RELEASE_VERSION
4848
ARG RELEASE_DRY_RUN
49-
COPY ./tests /src/tests
49+
COPY ./test /src/test
5050
COPY ./ci/run-tests.sh /src/ci/run-tests.sh
5151
RUN true && \
5252
([ "$RELEASE_DRY_RUN" != "true" ] && sleep 90 || true) && \

ci/release.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
# Run from the project root
4+
cd $(dirname ${BASH_SOURCE[0]})/..
5+
6+
# Get the tag for this release
7+
tag=$(echo $REF | cut -d'/' -f3-)
8+
9+
# Build the docker phase that will release and then test it
10+
docker build . \
11+
--target=release_test \
12+
--build-arg RELEASE_VERSION=$tag \
13+
--build-arg PYPI_TOKEN=${PYPI_TOKEN:-""} \
14+
--build-arg RELEASE_DRY_RUN=${RELEASE_DRY_RUN:-"false"}

0 commit comments

Comments
 (0)