Skip to content

Commit 4e4af28

Browse files
authored
Merge pull request #191 from DeterminateSystems/use-push-artifact-ids
Use push-artifact-ids for uploading binaries
2 parents 3ecd9dd + c2bdfd8 commit 4e4af28

File tree

4 files changed

+38
-135
lines changed

4 files changed

+38
-135
lines changed

.github/workflows/release-branches.yaml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ jobs:
2222
steps:
2323
- name: Checkout
2424
uses: actions/checkout@v4
25-
- name: Configure AWS Credentials
26-
uses: aws-actions/configure-aws-credentials@v2
27-
with:
28-
role-to-assume: ${{ secrets.AWS_S3_UPLOAD_ROLE }}
29-
aws-region: us-east-2
3025

3126
- name: Create the artifacts directory
3227
run: rm -rf ./artifacts && mkdir ./artifacts
@@ -36,31 +31,33 @@ jobs:
3631
name: flake-checker-ARM64-macOS
3732
path: cache-binary-ARM64-macOS
3833
- name: Persist the cache binary
39-
run: cp ./cache-binary-ARM64-macOS/flake-checker ./artifacts/flake-checker-ARM64-macOS
34+
run: cp ./cache-binary-ARM64-macOS/flake-checker ./artifacts/ARM64-macOS
4035

4136
- uses: actions/[email protected]
4237
with:
4338
name: flake-checker-X64-macOS
4439
path: cache-binary-X64-macOS
4540
- name: Persist the cache binary
46-
run: cp ./cache-binary-X64-macOS/flake-checker ./artifacts/flake-checker-X64-macOS
41+
run: cp ./cache-binary-X64-macOS/flake-checker ./artifacts/X64-macOS
4742

4843
- uses: actions/[email protected]
4944
with:
5045
name: flake-checker-X64-Linux
5146
path: cache-binary-X64-Linux
5247
- name: Persist the cache binary
53-
run: cp ./cache-binary-X64-Linux/flake-checker ./artifacts/flake-checker-X64-Linux
48+
run: cp ./cache-binary-X64-Linux/flake-checker ./artifacts/X64-Linux
5449

5550
- uses: actions/[email protected]
5651
with:
5752
name: flake-checker-ARM64-Linux
5853
path: cache-binary-ARM64-Linux
5954
- name: Persist the cache binary
60-
run: cp ./cache-binary-ARM64-Linux/flake-checker ./artifacts/flake-checker-ARM64-Linux
55+
run: cp ./cache-binary-ARM64-Linux/flake-checker ./artifacts/ARM64-Linux
6156

62-
- name: Publish Release (Branch)
63-
env:
64-
AWS_BUCKET: ${{ secrets.AWS_S3_UPLOAD_BUCKET }}
65-
run: |
66-
.github/workflows/upload_s3.sh branch "${{ github.ref_name }}" "$GITHUB_SHA"
57+
- uses: DeterminateSystems/push-artifact-ids@main
58+
with:
59+
s3_upload_role: ${{ secrets.AWS_S3_UPLOAD_ROLE }}
60+
bucket: ${{ secrets.AWS_S3_UPLOAD_BUCKET }}
61+
directory: ./artifacts
62+
ids_project_name: flake-checker
63+
ids_binary_prefix: flake-checker

.github/workflows/release-prs.yaml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,36 +40,33 @@ jobs:
4040
name: flake-checker-ARM64-macOS
4141
path: cache-binary-ARM64-macOS
4242
- name: Persist the cache binary
43-
run: cp ./cache-binary-ARM64-macOS/flake-checker ./artifacts/flake-checker-ARM64-macOS
43+
run: cp ./cache-binary-ARM64-macOS/flake-checker ./artifacts/ARM64-macOS
4444

4545
- uses: actions/[email protected]
4646
with:
4747
name: flake-checker-X64-macOS
4848
path: cache-binary-X64-macOS
4949
- name: Persist the cache binary
50-
run: cp ./cache-binary-X64-macOS/flake-checker ./artifacts/flake-checker-X64-macOS
50+
run: cp ./cache-binary-X64-macOS/flake-checker ./artifacts/X64-macOS
5151

5252
- uses: actions/[email protected]
5353
with:
5454
name: flake-checker-X64-Linux
5555
path: cache-binary-X64-Linux
5656
- name: Persist the cache binary
57-
run: cp ./cache-binary-X64-Linux/flake-checker ./artifacts/flake-checker-X64-Linux
57+
run: cp ./cache-binary-X64-Linux/flake-checker ./artifacts/X64-Linux
5858

5959
- uses: actions/[email protected]
6060
with:
6161
name: flake-checker-ARM64-Linux
6262
path: cache-binary-ARM64-Linux
6363
- name: Persist the cache binary
64-
run: cp ./cache-binary-ARM64-Linux/flake-checker ./artifacts/flake-checker-ARM64-Linux
64+
run: cp ./cache-binary-ARM64-Linux/flake-checker ./artifacts/ARM64-Linux
6565

66-
- name: Configure AWS Credentials
67-
uses: aws-actions/configure-aws-credentials@v2
66+
- uses: DeterminateSystems/push-artifact-ids@main
6867
with:
69-
role-to-assume: ${{ secrets.AWS_S3_UPLOAD_ROLE }}
70-
aws-region: us-east-2
71-
- name: Publish Release (PR)
72-
env:
73-
AWS_BUCKET: ${{ secrets.AWS_S3_UPLOAD_BUCKET }}
74-
run: |
75-
.github/workflows/upload_s3.sh pr "${{ github.event.pull_request.number }}" "${{ github.event.pull_request.head.sha }}"
68+
s3_upload_role: ${{ secrets.AWS_S3_UPLOAD_ROLE }}
69+
bucket: ${{ secrets.AWS_S3_UPLOAD_BUCKET }}
70+
directory: ./artifacts
71+
ids_project_name: flake-checker
72+
ids_binary_prefix: flake-checker

.github/workflows/release-tags.yaml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,39 +29,44 @@ jobs:
2929
name: flake-checker-ARM64-macOS
3030
path: cache-binary-ARM64-macOS
3131
- name: Persist the cache binary
32-
run: cp ./cache-binary-ARM64-macOS/flake-checker ./artifacts/flake-checker-ARM64-macOS
32+
run: cp ./cache-binary-ARM64-macOS/flake-checker ./artifacts/ARM64-macOS
3333

3434
- uses: actions/[email protected]
3535
with:
3636
name: flake-checker-X64-macOS
3737
path: cache-binary-X64-macOS
3838
- name: Persist the cache binary
39-
run: cp ./cache-binary-X64-macOS/flake-checker ./artifacts/flake-checker-X64-macOS
39+
run: cp ./cache-binary-X64-macOS/flake-checker ./artifacts/X64-macOS
4040

4141
- uses: actions/[email protected]
4242
with:
4343
name: flake-checker-X64-Linux
4444
path: cache-binary-X64-Linux
4545
- name: Persist the cache binary
46-
run: cp ./cache-binary-X64-Linux/flake-checker ./artifacts/flake-checker-X64-Linux
46+
run: cp ./cache-binary-X64-Linux/flake-checker ./artifacts/X64-Linux
4747

4848
- uses: actions/[email protected]
4949
with:
5050
name: flake-checker-ARM64-Linux
5151
path: cache-binary-ARM64-Linux
5252
- name: Persist the cache binary
53-
run: cp ./cache-binary-ARM64-Linux/flake-checker ./artifacts/flake-checker-ARM64-Linux
53+
run: cp ./cache-binary-ARM64-Linux/flake-checker ./artifacts/ARM64-Linux
5454

55-
- name: Configure AWS Credentials
56-
uses: aws-actions/configure-aws-credentials@v2
55+
- uses: DeterminateSystems/push-artifact-ids@main
5756
with:
58-
role-to-assume: ${{ secrets.AWS_S3_UPLOAD_ROLE }}
59-
aws-region: us-east-2
60-
- name: Publish Release to S3 (Tag)
61-
env:
62-
AWS_BUCKET: ${{ secrets.AWS_S3_UPLOAD_BUCKET }}
57+
s3_upload_role: ${{ secrets.AWS_S3_UPLOAD_ROLE }}
58+
bucket: ${{ secrets.AWS_S3_UPLOAD_BUCKET }}
59+
directory: ./artifacts
60+
ids_project_name: flake-checker
61+
ids_binary_prefix: flake-checker
62+
63+
- name: Rename binaries for GH release
6364
run: |
64-
.github/workflows/upload_s3.sh "tag" "$GITHUB_REF_NAME" "$GITHUB_SHA"
65+
mv ./artifacts/{,flake-checker-}ARM64-macOS
66+
mv ./artifacts/{,flake-checker-}X64-macOS
67+
mv ./artifacts/{,flake-checker-}X64-Linux
68+
mv ./artifacts/{,flake-checker-}ARM64-Linux
69+
6570
- name: Publish Release to GitHub (Tag)
6671
uses: softprops/action-gh-release@v1
6772
with:

.github/workflows/upload_s3.sh

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)