Skip to content

Commit 542755f

Browse files
authored
Publish binary at release (#211)
* Publish binary at release * Remove overwrite flag * Pin * Only release binary for devnet
1 parent 1857314 commit 542755f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/docker.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ env:
1515
startsWith( github.ref, 'refs/tags/devnet-' ) ||
1616
startsWith( github.ref, 'refs/tags/testnet-' ) ||
1717
startsWith( github.ref, 'refs/tags/mainnet-' ) }}
18+
IS_DEVNET_RELEASE: ${{
19+
startsWith( github.ref, 'refs/tags/devnet-' ) }}
20+
1821

1922
jobs:
2023
build:
@@ -51,6 +54,23 @@ jobs:
5154
docker image push "${PUB_IMAGE}"
5255
}
5356
echo "${{ secrets.DOCKER_IO_PASS }}" | publish
57+
58+
- name : Get binary from docker
59+
if : env.IS_DEVNET_RELEASE == 'true'
60+
run : |
61+
docker create -ti --name container "${DOCKER_IMAGE}" bash
62+
docker cp container:/home/pyth/pyth-client/target/deploy/pyth_oracle.so .
63+
docker rm -f container
64+
65+
- name : Publish binary
66+
if : env.IS_DEVNET_RELEASE == 'true'
67+
uses: svenstaro/upload-release-action@133984371c30d34e38222a64855679a414cb7575
68+
with:
69+
repo_token: ${{ secrets.GITHUB_TOKEN }}
70+
file: ./pyth_oracle.so
71+
asset_name: pyth_oracle.so
72+
tag: ${{ github.ref }}
73+
5474
pinning:
5575
runs-on: ubuntu-latest
5676
steps:

0 commit comments

Comments
 (0)