Skip to content

Commit ea4b476

Browse files
authored
Separate workflow for pythnet and solana (#381)
* Separate workflow for pythnet and solana * Add
1 parent b96b5ae commit ea4b476

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

.github/workflows/docker.yaml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ env:
1515
DOCKER_USER: ${{ secrets.DOCKER_IO_USER }}
1616
IS_RELEASE: ${{
1717
startsWith( github.ref, 'refs/tags/pythd-' ) ||
18-
startsWith( github.ref, 'refs/tags/oracle-' ) }}
19-
IS_ORACLE_RELEASE: ${{
20-
startsWith( github.ref, 'refs/tags/oracle-' ) }}
18+
startsWith( github.ref, 'refs/tags/mainnet-' ) }} ||
19+
startsWith( github.ref, 'refs/tags/pythnet-' ) }}
20+
IS_MAINNET_RELEASE: ${{
21+
startsWith( github.ref, 'refs/tags/mainnet-' ) }}
22+
IS_PYTHNET_RELEASE: ${{
23+
startsWith( github.ref, 'refs/tags/pythnet-' ) }}
2124

2225

2326
jobs:
@@ -56,20 +59,36 @@ jobs:
5659
}
5760
echo "${{ secrets.DOCKER_IO_PASS }}" | publish
5861
59-
- name : Get binary from docker
60-
if : env.IS_ORACLE_RELEASE == 'true'
62+
- name : Get Mainnet binary from docker
63+
if : env.IS_MAINNET_RELEASE == 'true'
6164
run : |
6265
docker create -ti --name container "${DOCKER_IMAGE}" bash
63-
docker cp container:/home/pyth/pyth-client/target/deploy/pyth_oracle.so .
66+
docker cp container:/home/pyth/pyth-client/target/pyth/solana/pyth_oracle_solana.so .
6467
docker rm -f container
6568
66-
- name : Publish binary
67-
if : env.IS_ORACLE_RELEASE == 'true'
69+
- name : Publish Mainnet binary
70+
if : env.IS_MAINNET_RELEASE == 'true'
6871
uses: svenstaro/upload-release-action@133984371c30d34e38222a64855679a414cb7575
6972
with:
7073
repo_token: ${{ secrets.GITHUB_TOKEN }}
71-
file: ./pyth_oracle.so
72-
asset_name: pyth_oracle.so
74+
file: ./pyth_oracle_solana.so
75+
asset_name: pyth_oracle_solana.so
76+
tag: ${{ github.ref }}
77+
78+
- name : Get Pythnet binary from docker
79+
if : env.IS_PYTHNET_RELEASE == 'true'
80+
run : |
81+
docker create -ti --name container "${DOCKER_IMAGE}" bash
82+
docker cp container:/home/pyth/pyth-client/target/pyth/pythnet/pyth_oracle_pythnet.so .
83+
docker rm -f container
84+
85+
- name : Publish Pythnet binary
86+
if : env.IS_PYTHNET_RELEASE == 'true'
87+
uses: svenstaro/upload-release-action@133984371c30d34e38222a64855679a414cb7575
88+
with:
89+
repo_token: ${{ secrets.GITHUB_TOKEN }}
90+
file: ./pyth_oracle_pythnet.so
91+
asset_name: pyth_oracle_pythnet.so
7392
tag: ${{ github.ref }}
7493

7594
pinning:

0 commit comments

Comments
 (0)