Skip to content

Commit 32c962b

Browse files
committed
ci: publish windows binaries to GCS
1 parent a2a68e6 commit 32c962b

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed

.github/workflows/release-artifacts-auto.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@ concurrency:
1414

1515
jobs:
1616
release-artifacts:
17-
if: github.repository == 'solana-labs/solana'
17+
if: github.repository == 'anza-xyz/agave'
1818
uses: ./.github/workflows/release-artifacts.yml
1919
with:
2020
commit: ${{ github.sha }}
2121
secrets:
22-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
23-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
24-
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
22+
GCS_RELEASE_BUCKET_WRITER_CREDIENTIAL: ${{ secrets.GCS_RELEASE_BUCKET_WRITER_CREDIENTIAL }}
2523

2624
error_reporting:
2725
needs:

.github/workflows/release-artifacts-manually.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@ jobs:
1414
with:
1515
commit: ${{ github.event.inputs.commit }}
1616
secrets:
17-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
18-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
19-
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
17+
GCS_RELEASE_BUCKET_WRITER_CREDIENTIAL: ${{ secrets.GCS_RELEASE_BUCKET_WRITER_CREDIENTIAL }}

.github/workflows/release-artifacts.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ on:
77
required: false
88
type: string
99
secrets:
10-
AWS_ACCESS_KEY_ID:
11-
required: true
12-
AWS_SECRET_ACCESS_KEY:
13-
required: true
14-
AWS_S3_BUCKET:
10+
GCS_RELEASE_BUCKET_WRITER_CREDIENTIAL:
1511
required: true
1612

1713
jobs:
@@ -71,17 +67,17 @@ jobs:
7167
shell: bash
7268
run: |
7369
FOLDER_NAME=${{ steps.build.outputs.tag || steps.build.outputs.channel }}
74-
mkdir -p "github-action-s3-upload/$FOLDER_NAME"
75-
cp -v "solana-release-x86_64-pc-windows-msvc.tar.bz2" "github-action-s3-upload/$FOLDER_NAME/"
76-
cp -v "solana-release-x86_64-pc-windows-msvc.yml" "github-action-s3-upload/$FOLDER_NAME/"
77-
cp -v "solana-install-init-x86_64-pc-windows-msvc"* "github-action-s3-upload/$FOLDER_NAME"
70+
mkdir -p "windows-release/$FOLDER_NAME"
71+
cp -v "solana-release-x86_64-pc-windows-msvc.tar.bz2" "windows-release/$FOLDER_NAME/"
72+
cp -v "solana-release-x86_64-pc-windows-msvc.yml" "windows-release/$FOLDER_NAME/"
73+
cp -v "solana-install-init-x86_64-pc-windows-msvc"* "windows-release/$FOLDER_NAME"
7874
7975
- name: Upload Artifacts
8076
if: ${{ steps.build.outputs.channel != '' || steps.build.outputs.tag != '' }}
8177
uses: actions/upload-artifact@v3
8278
with:
8379
name: windows-artifact
84-
path: github-action-s3-upload/
80+
path: windows-release/
8581

8682
windows-s3-upload:
8783
if: ${{ needs.windows-build.outputs.channel != '' || needs.windows-build.outputs.tag != '' }}
@@ -92,7 +88,16 @@ jobs:
9288
uses: actions/download-artifact@v3
9389
with:
9490
name: windows-artifact
95-
path: ./github-action-s3-upload
91+
path: .windows-release/
92+
93+
- name: Setup crediential
94+
uses: "google-github-actions/auth@v2"
95+
with:
96+
credentials_json: "${{ secrets.CHIDO_TEST_RELEASE_GCS_CREDIENTIAL }}"
97+
98+
- name: Upload files to GCS
99+
run: |
100+
gcloud storage cp --recursive windows-release/* gs://anza-release/
96101
97102
- name: Upload
98103
uses: jakejarvis/s3-sync-action@master
@@ -103,7 +108,7 @@ jobs:
103108
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
104109
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
105110
AWS_REGION: "us-west-1"
106-
SOURCE_DIR: "github-action-s3-upload"
111+
SOURCE_DIR: "windows-release"
107112

108113
windows-gh-release:
109114
if: ${{ needs.windows-build.outputs.tag != '' }}
@@ -114,12 +119,12 @@ jobs:
114119
uses: actions/download-artifact@v3
115120
with:
116121
name: windows-artifact
117-
path: ./github-action-s3-upload
122+
path: .windows-release/
118123

119124
- name: Release
120125
uses: softprops/action-gh-release@v1
121126
with:
122127
tag_name: ${{ needs.windows-build.outputs.tag }}
123128
draft: true
124129
files: |
125-
github-action-s3-upload/${{ needs.windows-build.outputs.tag }}/*
130+
windows-release/${{ needs.windows-build.outputs.tag }}/*

0 commit comments

Comments
 (0)